All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog.
- Show inlay hints for variables in
for x in y
loops
- Sync to upstream Luau 0.553
- Fixed rename symbol not working when cursor after variable
- Fixed rename symbol causing server crashing when attempting to rename a token which is not a variable
- Respect client capabilities for snippet support in completion items
- Respect
luau-lsp.completion.addParentheses
whenfillCallArguments
is enabled - Fixed Inlay Hints crash when calling a function which only takes varargs
- Fixed Request Failed due to "No managed text document" as URLs were not being updated correctly
- Show documentation for overloaded functions in completion and hover. We show the documentation string of the first overload, and how many other overloads are present.
- Show documentation for builtin class methods in signature help, including for the correct overload
- Show documentation for parameters in signature help
- Added
luau-lsp.completion.addParentheses
andluau-lsp.completion.addTabstopAfterParentheses
to configure whether parentheses are added when completing a function call, and whether we include a tab stop after the parentheses respectively. - Automatically fill function call arguments using parameter names. This can be disabled using
luau-lsp.completion.fillCallArguments
.
- Sync to upstream Luau 0.551
- Hide parameter name and variable inlay hint if the name is just
_
- Fixed string-based requires to use a fully-qualified file path, fixing Document Link (Follow Link) support for requires
- Fixed reverse dependencies not being marked as dirty when using string requries due to unnormalised file paths
- Fixed incorrect highlighting of unnamed parameters in signature help when multiple parameters present of same type
- Fixed documentation not provided for some built-ins on hover
- Fixed signature help highlighting of parameters named
_
- Fixed documentation comments of parent function being attached to a nested function
- Use location to determine which parameter is active in signature help
- Correctly handle highlighting variadic arguments in signature help
- [Sublime Text] Fixed push diagnostics not being recomputed when sourcemap or
.luaurc
changes
- Fixed attempting to run workspace diagnostics on null workspace causing Internal Server errors (affecting Sublime Text)
- Provide autocomplete for class names in
Instance:IsA("ClassName")
and errors when ClassName is unknown - Provide autocomplete for properties in
Instance:GetPropertyChangedSignal("Property")
and errors when Property is unknown - Provide autocomplete for enums in
EnumItem:IsA("enum")
and errors when Enum is unknown - Added support for moonwave-style documentation comments! Currently only supports comments attached to functions directly. See https://eryn.io/moonwave for how to write doc comments
- Added command line flag
--ignore=GLOB
toluau-lsp analyze
allowing you to provide glob patterns to ignore diagnostics, similar toluau-lsp.ignoreGlobs
. Repeat the flag multiple times for multiple patterns
- Sync to upstream Luau 0.549
- Deprioritise metamethods (
__index
etc.) in autocomplete
- Fixed inlay hints not showing for variable types when
hover.strictDataModelTypes
is disabled - Fixed Internal Errors for workspace diagnostics when a type error was being displayed backed by the incorrect text document causing string errors
- Fixed Internal Errors for goto definitions as incorrect document used for string conversions
- Fixed overloaded functions not being highlighted as functions in autocomplete
- Potential fix to Request Failed errors
- Fixed
self
incorrectly showing up in Inlay Hints and Signature Help - Fixed Studio Plugin syncing causing server crashes
- Sync to upstream Luau 0.548
- Fixed inlay hints no longer showing up
- Fixed inlay hints not showing up in first load of file until a dummy change is made
- Fixed DM types not generated for
script
nodes. Improved autocomplete will now be provided for non-DataModel projects (e.g.Tool
as Root)
- Sync to upstream Luau 0.547
- Fixed handling of UTF-16 characters of different size to UTF-8 (i.e., emojis, non-english text). Will no longer produce malformed strings and weird diagnostics
- Added support for Semantic Tokens
- Improved autocomplete items ordering by applying heuristics to sort items
- Table keys are prioritised when autocompleting inside of a table
- Fixed
.meta.json
file being picked as a script's file path instead of the actual Luau file - Fixed diagnostics not clearing for files when workspace diagnostics is not enabled
- Fixed metatable name not being used when hovering over the function of a metatable
- Manually increased some internal limits to reduce likelihood of type errors
- Fixed diagnostics (and other global configuration) not loading when not inside of a workspace
- Fixed server erroring when configuration is not sent by the client
- Fixed diagnostics not showing on initial startup in push diagnostics mode (Sublime Text)
- Fixed "insert inlay hint" incorrectly enabled for error types
- Further improvements to instance type creation
- Sync to upstream Luau 0.546
- Children of
game
will now correctly show in autocomplete - Fix autocomplete of non-identifier properties:
[email protected]
->Packages._Index["[email protected]"]
- Fixed mapping of requires from
game.Players.LocalPlayer.PlayerScripts
togame.StarterPlayer.StarterPlayerScripts
(and PlayerGui + StarterGear) - Fixed type errors being reported twice in
luau-lsp analyze
- Introduced a Studio plugin to infer instance trees for partially managed projects. This works alongside Rojo sourcemaps, where instance information retrieved from Studio is merged into the sourcemap. Starting the plugin can be configured using
luau-lsp.plugin.enabled
. Install the plugin from the Plugin Marketplace
- Sync to upstream Luau 0.545
- Inlay hints for variables will no longer show if the type hint string is the same as the variable name (i.e.,
local tbl = {}
, the hint: tbl
will no longer show) (#137) - Restructured instance types system to reduce memory and type creation footprint
- Fixed false document diagnostics showing up for opened tabs when VSCode is first started (#132)
- Sync to upstream Luau 0.543
- Fixed diagnostics for ignored files not clearing when workspace diagnostics is enabled (#77)
- Fixed
luau-lsp analyze
would not exit with non-zero error code when definitions failed to load - Fixed
luau-lsp analyze
would not exit with non-zero error code when file path provided was not found - Fixed crash when Suggest Imports is enabled and you have a local variable defined with no assigned value (e.g.
local name
)
- Sync to upstream Luau 0.542
- New service imports which come first alphabetically will group with existing imports rather than going at the beginning of the file
- Fixed warning messages showing up as notifications when generating Rojo Sourcemap even if it works successfully
-
Added configuration options to enable certain Language Server features. By default, they are all enabled:
luau-lsp.completion.enabled
: Autocompleteluau-lsp.hover.enabled
: Hoverluau-lsp.signatureHelp.enabled
: Signature Help
-
Added configuration option
luau-lsp.hover.showTableKinds
(default: off) to indicate whether kinds ({+ ... +}
,{| ... |}
) are shown in hover information -
Added configuration option
luau-lsp.hover.multilineFunctionDefinitions
(default: off) to spread function definitions in hover panel across multiple lines -
Added configuration option
luau-lsp.hover.strictDatamodelTypes
(default: on) to use strict DataModel type information in hover panel (equivalent to autocomplete). When disabled, the same type information that the diagnostic type checker uses is displayed -
Added support for automatic service importing. When using a service which has not yet been defined, it will be added (alphabetically) to the top of the file. Config setting:
luau-lsp.completion.suggestImports
- Sync to upstream Luau 0.540
- The types of
:FindFirstChild
,:FindFirstAncestor
and:FindFirstDescendant
have been changed to returnInstance?
:GetActor
is fixed to returnActor?
- Fixed bug when using
--definitions=
when callingluau-lsp analyze
- Fixed
self
being showed as the first inlay hint incorrectly in parameter names and types
- Added support for cross-file go to definition of functions
- Added support for go-to definition of properties defined on a metatable with
__index
- Added support for inlay hints. It can be enabled by configuring
luau-lsp.inlayHints.parameterNames
,luau-lsp.inlayHints.parameterTypes
,luau-lsp.inlayHints.variableTypes
,luau-lsp.inlayHints.functionReturnTypes
.
- Sync to upstream Luau 0.538
- Improved completion detail function param information with better representative types, and include a trailing type pack if present
- Fixed crash when hovering over local in incomplete syntax tree
- Fixed language server not working for newly created files not yet stored on disk
- Luau LSP will now activate if you run an LSP command
- Fixed finding the incorrect workspace folder to analyze with in a multi-workspace environment
- Fix crash when hovering over function type definitions
- Reintroduced support for workspace diagnostics, with proper streaming support. Enable
luau-lsp.diagnostics.workspace
for project wide diagnostics. - You can now hover over a type node to get type information. In particular, this works for properties inside type tables, and hovering over
typeof()
, allowing you to determine what typeof resolved to. - Added Go To Definition for type references
- Added
Luau: Regenerate Rojo Sourcemap
command to force regeneration of a Rojo sourcemap - Improved case where project file
default.project.json
was not found. We search for other project files, and prompt a user to configure
- Sync to upstream Luau 0.536
- Improved extension error message when Rojo version present does not have sourcemap support
- Document links will now resolve for requires in all locations of a file, not just the top level block
- A diagnostic refresh will now be requested once sourcemap contents change
- With the introduction of workspace diagnostics, ignored files should now only show diagnostics when specifically opened
- Document symbols for method definitions now correctly use a colon instead of a dot operator.
- Fixed crash when hovering over a type node
- Fixed go to definition on a global just going to the top of the file. It will now not accept go to definition requests
- Fixed using absolute file paths to point to definition files not working on Windows
- Added
luau-lsp.sourcemap.enabled
option which dictates whether sourcemap-related features are enabled - Diagnostics will now be provided for definitions files which errored
- Added
luau-lsp.sourcemap.rojoPath
to explicitly specify the path to a Rojo executable instead of relying on it being available from the workspace directory - Added hover information when hovering over a type definition
- Moved definitions file loading to post-initialization
- Sync to upstream Luau 0.534
- A
_
will no longer show when we can't determine a function name / a function isn't named.
- Fixed regression where diagnostics are not cleared when you close an ignored file
- Fixed errors sometimes occuring when you index
script
/workspace
/game
for children - Fixed internal error caused by
:Clone()
calls when called on an expression which isn't an Lvalue (e.g.,inst:FindFirstChild(name):Clone()
) - Fixed bug where
_:
would not be removed as the name of function arguments.function foo(_: number, _: number)
will now show asfunction foo(number, number)
- Fixed analyze mode not exiting with a non-zero exit code when there are errors
- Fixed excessive whitespace in document symbols for expr-named function defintions
- Fixed hover for global functions and local variables
- Downgraded missing types/documentation files to a warning in the logs instead of a window error. It is common for no file to be provided in a vanilla build.
- Fixed diagnostics not showing for any file after the first one you open
- Module name will now be included in hover and signature displays for imported types
- Fixed bug where in-memory contents of a document which was deleted were not cleared, causing spurious errors when recreating a new document of the same name.
- Fixed duplicate diagnostics displayed and never clearing when
workspace
diagnostics configuration was enabled
- Added predicate logic to
EnumItem:IsA("Type")
so it will now narrow the type of an EnumItem when used as a predicate - Added setting to configure whether all Luau FFlags are enabled by default. This can be configured using
luau-lsp.fflags.enableByDefault
or--no-flags-enabled
command line option. Currently, all FFlags are enabled by default, but you can manually sync/override them. - Added support for adding extra definition files to load using
luau-lsp.types.definitionFiles
- Roblox definitions can now be disabled using
luau-lsp.types.roblox
- Added label details to completion items
- Sync to upstream Luau 0.532
- Updated to improve table type stringification, with an appropriate newline placed in between braces. This should result in better readable table types when hovering
- Upgraded vscode language client to 8.0, with support for LSP Specification 3.17
- VSCode Client now makes use of diagnostics pull model
- Fixed equality comparison between enum items raising a type error
- Fixed autocompletion of properties with spaces not correctly being converted into a
["property"]
index leading to a type error - Fixed function stringification when using an expression index call such as
data["property"]()
- Fixed workspace diagnostics not respecting ignore globs for dependent files
- Added Document Symbols support
- Merged luau-analyze-rojo into the project to simplify maintenance. To run a standalone analysis tool, run
luau-lsp analyze
- Added links to Luau Documentation for lint warnings
- Added documentation to Enum types
- Diagnostics of dependents (i.e., files which require a changed file) will now refresh to display type errors when the file changes
- Added support for workspace-wide diagnostics to report in all files. You can enable this using
luau-lsp.diagnostics.workspace
. It is disabled by default
- Sync to upstream Luau 0.531
- Unused lints will are now tagged appropriately so they render faded out
- Fixed the equality comparison between two Instance types causing a type error
- Fixed false positive type errors occuring when using DataModel instance types. Unfortunately, for this fix we had to temporarily type all DataModel instances as
any
. You should still get proper autocomplete and intellisense, however type errors will no longer throw for unknown children. - Fixed enum types to be under the "Enum" library, so the types are referenced using
Enum.Font
instead ofEnumFont
- HTML Tags have been stripped from documentation so they should render better in IntelliSense
- Fixed "Text Document not loaded locally" error occuring when you start typing in a newly created file (as the sourcemap is not yet up-to-date)
- Added support for configuring enabled Luau FFlags
- Added support for pulling in the currently enabled FFlags in Studio, in order to replicate behaviour
- The "Updating API" message will now only show on the status bar instead of a popup notification.
- Instance types will now be named by the Class Name rather than the Instance name
- File system watchers for
.luaurc
andsourcemap.json
are now registered on the server side
- Fixed requiring modules when using
:FindFirstAncestor("Ancestor")
- Fixed requiring modules in
LocalPlayer.PlayerGui
/LocalPlayer.PlayerScripts
/LocalPlayer.StarterGear
- Changing
.luaurc
configuration will now refresh the config cache and update internally
- Player will now have
PlayerGui
,Backpack
,StarterGear
andPlayerScripts
children, with the relevant Starter instances copied into it (StarterGui, StarterPack, PlayerScripts) Instance:FindFirstChild("name")
andInstance:FindFirstAncestor("name")
will now correctly resolve to the relevant instance type if found. This allows the type checker to correctly resolve children/parents etc.
- Sync to upstream Luau 0.530
- Fixed extension repeatedly downloading latest API information when it is already up to date
- Fixed
self: Type
showing up in hover information/autocomplete when it is unnecessary at it has been inferred by the:
operator - Fixed extension not displaying error if calling out to
Rojo
command fails - Fixed reverse dependencies not updating when types of required modules change (causing the type system to be incorrect). i.e., if you required script B in script A, and change script B, now the change will propagate to script A
- Can disable automatic sourcemap generation in extension settings.
- Can change the project file used to generate sourcemap in extension settings (defaults to
default.project.json
). - Can toggle whether non-script instances are included in the generated sourcemap (included by default).
- Added support for "Find References"
- Currently only works for finding all references of a local variable in the current document. Cross-file references will come in future.
- Added support for "Rename"
- Currently only works for local variables in the current document. Cross-file references will come in future.
- Sync to upstream Luau 0.528
- Added hover information for type references
- Added end autocompletion functionality, as done in Studio. Can be enabled through
luau-lsp.autocompleteEnd
- Added automatic sourcemap regeneration when files change. This relies on
rojo
being available to execute in the workspace folder (i.e., on the PATH), withrojo sourcemap
command support
- Improved Go To Type Definition support
- Improved overall Go To Definition support
- Can now handle function definitions in tables
- Can handle cross-file definitions
- Can handle deeply nested tables - multiple properties (incl. cross file support)
- Hovering over a property inside a table will now give you type information about the assigned expression, rather than just "string"
- Fixed syntax highlighting of generic type packs in function definitions
- Fixed signature help not showing up
- Fixed markdown in completion not working
- Added basic go to definition and go to type definition support
- Added support for pull-based diagnostics
- Added the base support for user configuration through extension settings
- Added support for marking specific globs as ignored (through extension settings). If a file is ignored, diagnostics will ONLY be displayed when the file is explicitly opened. If the file is closed, diagnostics will be discarded.
- Cross compiled macOS binary to arm64
- Hover over definitions will now try to give more expressive types
self
will now no longer show up in hover/signature help if it has already been implicitly provided_:
will no longer show up in hover/signature help for unnamed function parameters
- Fixed hover over method function definitions not working
- Added a fallback to the prefix of a method name if we can't find the actual name
- Fixed diagnostics lost on a reopened file because we did not mark it as dirty
- Fixed invalid path computed for related diagnostics so they were not showing in the editor
- Implemented Document Link Provider
- Added JSON require support
- Added Documentation support
- Improved hover design
globalTypes.d.lua
and the API docs will now be automatically downloaded by the client and passed to the server. The user no longer needs to manage this.
- Fixed spurious diagnostics on initial load of a file
- Implement Signature Help Provider
- Use incremental text document sync
- Enabled all Luau FFlags by defaults
- Improved stringification of functions to look nicer in hover and signature help
- Fix crash when workspace does not have a
sourcemap.json
present in root
- Bug Fixes
- Initial basic release