[1.16.0] - 2023-01-29
Added
- Support documentation comments attached to a table and table types, e.g. on
DATA
in the following:
--- Doc comment
local DATA = {
...
}
--- Doc comment
type Contents = {
...
}
- Include documentation comments on functions and tables in autocompletion
- Added configuration option
luau-lsp.require.mode
to configure how string requires are resolved. It can either be relativeToWorkspaceRoot
(default) or relativeToFile
- Added
luau-lsp.types.documentationFiles
to support adding extra documentation symbols to the database. These are used to support definition files, and should be in the same format as shown here
- Added
luau-lsp.diagnostics.strictDatamodelTypes
(default: false
) which configures whether we use expressive DataModel types to power diagnostics.
When off, game
/ script
/ workspace
(and all their members) are typed as any
, which helps to prevent false positives, but may lead to false negatives.
- Added CLI option
--base-luaurc=PATH
for both LSP and Analyze mode to provide a path to a .luaurc
file which is used as the default configuration
- Added support for Go To Definition / Type Definition on imported type references
module.Type
(gated behind FFlag SupportTypeAliasGoToDeclaration
)
Changed
- Sync to upstream Luau 0.560
- Class symbols with no documentation present in the docs file will no longer show anything on hover/autocomplete (i.e. won't show
@luau/global/require
)
Instance.new()
now accepts variables which are of type string without erroring. It will instead error when Instance.new is called with a string literal which is an unknown class name
- In the CLI,
luau-lsp lsp
now supports passing multiple --docs=
parameters
- The CLI will now error when an unknown option is passed to it
- Diagnostics will now be emitted on
.luaurc
files with parse errors
Fixed
- Fixed unknown require errors occurring in multi-root workspaces when in a folder which isn't the first one
- Fixed diagnostics not clearing for files which were deleted unconventionally (i.e., outside of VSCode using File Explorer, or external commands such as
git stash
)