Language Server Implementation for Luau
MIT License
Bot releases are visible (Hide)
Published by github-actions[bot] over 1 year ago
luau-lsp.fflags.override
will now be parsed when using CLI analyze settings. Note that the other fflags
options are not supported in CLI analyze modePublished by github-actions[bot] over 1 year ago
init.luau
(or init.lua
) files inside of them. i.e. require("../Directory")
resolves to ../Directory/init.luau
.--settings=path/to/settings.json
which takes in LSP-style settings to configure features such as require settings. Note: this is separate to .luaurc
@
)debug
and utf8
librarytypeof()
showing up in signature help for builtin tables (e.g. function typeof(string).byte(...)
)string
librarytype NAME = ...
Published by github-actions[bot] over 1 year ago
luau-lsp.autocompleteEnd
setting in favour of luau-lsp.completion.autocompleteEnd
Module
in type Foo = Module.Bar
luau-lsp.require.directoryAliases
to map require string prefixes to directoriesluau-lsp.require.fileAliases
(and directoryAliases
), mapping ~/foo.lua
to a file in your home directoryluau-lsp.ignoreGlobs
),luau-lsp.index.maxFiles
(default: 10,000) to configure the amount of files indexed before backing off.Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago
Ctrl + T
luau-lsp.require.fileAliases
to statically provide custom mappings from string requires to a file path.@example/constants
mapping to C:/fakepath/constants.luau
will automatically resolve require("@example/constants")
do .. end
, for - do .. end
function() .. end
etc.x = { .. }
foo(..)
--[[ .. ]]
--#region
and --#endregion
Published by github-actions[bot] over 1 year ago
--no-strict-dm-types
for analyze CLI to disable strict datamodel types and its associated false positivesPublished by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago
luau-lsp.completion.suggestImports
: use luau-lsp.completion.imports.enabled
insteadluau-lsp.index.enabled
which will index the whole workspace into memory. If disabled, only limited support for Find All References and rename is possibleluau-lsp.index.enabled
must be enabled for full support.luau-lsp.index.enabled
is disabled, this feature is disabled for correctness reasons.luau-lsp.index.enabled
is disabled, this exported types renaming is disabled for correctness reasons.luau-lsp.completion.imports.enabled
: replaces luau-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)luau-lsp.index.enabled
to be enabled for full support.#!
present at top of filerequire("Constants/Te|")
.Published by github-actions[bot] over 1 year ago
require(location) :: any
)--!strict
)Published by github-actions[bot] over 1 year ago
Color3
colors using the color pickerluau-lsp.completion.suggestImports
. (Thanks @HawDevelopment!)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.
Published by github-actions[bot] over 1 year ago
.luaurc
in current working directory not taken into account when calling luau-lsp analyze
LuauAutocompleteSkipNormalization
to be enabledPublished by github-actions[bot] over 1 year ago
Sort requires
and Sort services
(services only enabled if luau-lsp.types.roblox
== true)."editor.codeActionsOnSave": {
"source.organizeImports": true
}
Equivalent functionality has also been added to StyLua
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 |
---|---|
Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago
Please do let me know if this has improved (or worsened) the issue!
Published by github-actions[bot] over 1 year ago
--base-luaurc
not registering for an LSP serverPublished by github-actions[bot] over 1 year ago
selectionRange
will now be fully enclosed by range
Published by github-actions[bot] over 1 year ago
DATA
in the following:--- Doc comment
local DATA = {
...
}
--- Doc comment
type Contents = {
...
}
luau-lsp.require.mode
to configure how string requires are resolved. It can either be relativeToWorkspaceRoot
(default) or relativeToFile
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
luau-lsp.diagnostics.strictDatamodelTypes
(default: false
) which configures whether we use expressive DataModel types to power diagnostics.game
/ script
/ workspace
(and all their members) are typed as any
, which helps to prevent false positives, but may lead to false negatives.--base-luaurc=PATH
for both LSP and Analyze mode to provide a path to a .luaurc
file which is used as the default configurationmodule.Type
(gated behind FFlag SupportTypeAliasGoToDeclaration
)@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 nameluau-lsp lsp
now supports passing multiple --docs=
parameters.luaurc
files with parse errorsgit stash
)Published by github-actions[bot] almost 2 years ago
config.types.roblox
)--- documentation comment
local x = "string"
--- another doc comment
local y = function()
end
local tbl = {
--- This is some special information
data = "hello",
--- This is a doc comment
values = function()
end,
}
local x = tbl.values -- Should give "This is a doc comment"
local y = tbl.data -- Should give "This is some special information"
luau-lsp.fflags.enableByDefault
. It is recommended to keep luau-lsp.fflags.sync
enabled so that FFlags sync with upstream Luau=
sign for multiline doc comments, so --[[
and --[===[
etc. are valid openersrequire(instance:FindFirstChild("Testing", true))
will no longer resolve as an immediate child of instance due to the recursive argumentnever
typeslocal CONSTANT
)Full Changelog: https://github.com/JohnnyMorganz/luau-lsp/compare/1.14.3...1.15.0
Published by github-actions[bot] almost 2 years ago