Releases: JohnnyMorganz/luau-lsp
Releases Β· JohnnyMorganz/luau-lsp
1.20.2
[1.20.2] - 2023-05-10
Fixed
- Fixed internal error for LazyType unwrapping
1.20.1
[1.20.1] - 2023-05-09
Fixed
- Fixed bug in semantic tokens system causing language server crashes
1.20.0
[1.20.0]
Added
- Added support for workspace symbols to resolve symbols across the whole workspace. In VSCode, you can open this using
Ctrl + T
- Added configuration option
luau-lsp.require.fileAliases
to statically provide custom mappings from string requires to a file path.
For example, adding@example/constants
mapping toC:/fakepath/constants.luau
will automatically resolverequire("@example/constants")
- Added support for Folding Ranges. The language server now signals the following foldable ranges in a document:
- Whole blocks, such as
do .. end
,for - do .. end
function() .. end
etc. - Tables, and type tables
x = { .. }
- Multiline function calls
foo(..)
- Block comments
--[[ .. ]]
- Custom comment regions denoted using
--#region
and--#endregion
- Whole blocks, such as
- Added support for Call Hierarchies. Call Hierarchies allow you to view all incoming and outgoing calls of a function:
i.e., all functions that call the current function, as well as all functions that the current function calls.
This works at multiple levels, displaying ancestor and descendant functions.
Changed
- Sync to upstream Luau 0.575
1.19.2
[1.19.2]
Fixed
- Fixed forced expressive types in diagnostics
- Added option
--no-strict-dm-types
for analyze CLI to disable strict datamodel types and its associated false positives
1.19.1
[1.19.1] - 2023-04-27
Fixed
- Fixed regression in DataModel item autocompletion
1.19.0
[1.19.0] - 2023-04-26
Deprecated
- Deprecated config
luau-lsp.completion.suggestImports
: useluau-lsp.completion.imports.enabled
instead
Added
- Added setting
luau-lsp.index.enabled
which will index the whole workspace into memory. If disabled, only limited support for Find All References and rename is possible - Added support for finding all references of both local and exported types. For exported types,
luau-lsp.index.enabled
must be enabled for full support. - Added support for renaming table properties across files. If
luau-lsp.index.enabled
is disabled, this feature is disabled for correctness reasons. - Added support for renaming types (both local and exported). If
luau-lsp.index.enabled
is disabled, this exported types renaming is disabled for correctness reasons. - Added more settings to auto-importing:
luau-lsp.completion.imports.enabled
: replacesluau-lsp.completion.suggestImports
(default: false)luau-lsp.completion.imports.suggestServices
: whether GetService imports are included in suggestions (default: true)luau-lsp.completion.imports.suggestRequires
: whether auto-requires are included in suggestions (default: true)luau-lsp.completion.imports.requireStyle
: the style of require format (default: "auto")luau-lsp.completion.imports.separateGroupsWithLine
: whether an empty line should be added in between services and requires (default: false)
Changed
- Sync to upstream Luau 0.573
- Improved find all references system for tables. We can now track all references to table and its properties across files. This requires
luau-lsp.index.enabled
to be enabled for full support.
Fixed
- Fixed pull diagnostics result not following spec
- Fixed errors when file has shebang
#!
present at top of file - Fixed string require autocompletion failing when autocomplete triggered on an incomplete string, e.g.
require("Constants/Te|")
.
Originally, nothing would autocomplete. Now, everything inside of the Constants folder will still autocomplete as usual (filtered for "Te").
1.18.1
[1.18.1] - 2023-03-23
Fixed
- Fixed server crash when auto require imports is enabled and there is a type-asserted require present in the file (
require(location) :: any
) - Fixed additional automatic service imports when completing an automatic require import being placed before a hot comment (such as
--!strict
) - Fixed automatic require import being placed incorrectly we also autocomplete a service. This can be shown when there is a multiline comment, and the service is imported above that comment, but the require gets imported inside of the comment incorrectly.
1.18.0
[1.18.0] - 2023-03-20
Added
- Added support for changing
Color3
colors using the color picker - Added support for automatic require imports (currently only for Roblox mode). If you start typing the name of a module in your code, you can autocomplete the require statement automatically. This feature is enabled by setting
luau-lsp.completion.suggestImports
. (Thanks @HawDevelopment!)
Code_v0GdNGjzUX.mp4
Changed
- Sync to upstream Luau 0.568.
In particular, this provide improvements to control flow analysis refinements. This allows the type checker to recognise type
options that are unreachable after a conditional/unconditional code block. e.g.:
local function x(x: string?)
if not x then return end
-- x is 'string' here
end
To enable this feature, the FFlag LuauTinyControlFlowAnalysis
must currently be enabled.
- The language server will only be enabled on "file" and "untitled" schemes. This means it will be disabled in diff mode
and live share. This is because we cannot yet provide sufficient information in these contexts.
1.17.1
[1.17.1] - 2023-03-04
Changed
- Sync to upstream Luau 0.566
Fixed
- Don't autocomplete another set of parentheses on a function call if they already exist
- Fix
.luaurc
in current working directory not taken into account when callingluau-lsp analyze
- Fixed slowdown of autocompletion when at a position where a type is explicitly expected (e.g., autocompleting a return expression when a return type is specified). Currently requires
LuauAutocompleteSkipNormalization
to be enabled
1.17.0
[1.17.0] - 2023-02-12
Added
- Added two code actions:
Sort requires
andSort services
(services only enabled ifluau-lsp.types.roblox
== true).
These actions will sort their respective groups alphabetically based on a variable name set.
You can also set these actions to automatically run on save by configuring:
"editor.codeActionsOnSave": {
"source.organizeImports": true
}
Code_OlQbWEgpWo.mp4
Equivalent functionality has also been added to StyLua
Changed
-
Sync to upstream Luau 0.563
-
Prioritised common services and Instance properties/methods in autocomplete so that they show up first. This is especially useful for services like
ReplicatedStorage
, and methods like:FindFirstChild
Before | After |
---|---|
Fixed
- Further fixes to document symbols failing due to malformed ranges