All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog.
- Sync to upstream Luau 0.714
- Sync to upstream Luau 0.712
- Fragment autocomplete is now enabled by default (#1268)
- Updated syntax file with improvements to TextMate grammar:
- Added support for type instantiation syntax (
<</>>) (e.g.Map<<string, number>>) - Fixed nested type declarations inside indented blocks (e.g. inside
if/doblocks) not being highlighted correctly - Fixed multiline type declarations (e.g.
type Foo = \n | string \n | number) losing type highlighting on continuation lines - Fixed fenced
```luaucode blocks in doc comments allowing syntax errors to escape past the closing```boundary - Added syntax highlighting support for the
constkeyword, includingconstvariable declarations andconst functiondefinitions
- Added support for type instantiation syntax (
- Removed deprecated
luau-lsp.require.fileAliasesandluau-lsp.require.directoryAliasesconfiguration options. Use.luaurc/.config.luaualiases instead
- Documentation for built-in Luau functions (e.g.
math.abs,table.find) is now provided in standard platform mode (#1357)
- Sync to upstream Luau 0.710
- Fixed inlay hints showing
: (())instead of: ()for functions returning empty type packs (#1381) - Fixed type functions in definition files causing
user-defined type function module has expirederrors (#1382) - Fixed require-by-string resolution not following symlinks (#896)
- Fixed auto-imports incorrectly showing when indexing a variable inside a table literal (#1384)
Instance:QueryDescendants()now narrows the return type based on class names in the selector string (e.g.,"BasePart"returns{BasePart}) (#1365)
- Sync to upstream Luau 0.708
- Sourcemap is no longer autogenerated from Studio Plugin info when
sourcemap.enabledis set tofalse - Documentation is now shown for base table members of metatable types when
__indexexists (#1360) - Fixed crash ("invalid string position") when computing inlay hints for truncated intersection or union types with type spans
- Go To Definition on the original local function definition now works. This means Ctrl/Cmd+Click on the local function declaration will now open the references panel in VSCode (#1122)
- Go To Definition and Documentation is now available on named types inside of inlay hints (#876, #877)
- Sync to upstream Luau 0.706
- Hover information is no longer shown when hovering over symbols inside a comment (#1337)
luau-lsp analyzewill now process@robloxdefinition files before others, matching the behavior of the language server (#1341)- Studio plugin no longer crashes when lacking script injection permission (#1343)
- Sync to upstream Luau 0.704
- Fixed use-after-free in cached DataModel types after a Studio Plugin update with an existing sourcemap, leading to server crashes (#1331)
luau-lsp analyzewill now respectluau-lsp.fflags.enableNewSolverif enabled in the provided--settingsfile (#1321)- Added
luau-lsp.completion.showAnonymousAutofilledFunctionsetting (enabled by default) to control whether the "function (anonymous autofilled)" completion item is shown when autocompleting callback arguments - Added
luau-lsp.completion.showDeprecatedItemssetting (enabled by default) to control whether deprecated items are shown in autocomplete suggestions - Added language server support for the upcoming Studio Script Sync release, via the Studio Plugin. (#1295)
- When the Studio Plugin is enabled alongside Studio Script Sync, it will also populate file path information for synced instances, enabling require functionality.
- The synced tree with file path information will be written to the
sourcemap.jsonfile, giving access for external tools. - External editors will need to implement the
GET /get-file-pathsendpoint for the local HTTP server to support Studio Script Sync
- VSCode: the extension will now automatically activate when your opened folder contains any
.luaufiles, not just when you explicitly open a Luau file. This allows the Studio Plugin to start up and connect quicker (#1278) - Entries marked as deprecated will now be sorted to the bottom of the autocomplete items list (#1318)
- VSCode: fixed cursor being positioned outside of the string after performing automatic quote conversion to backticks (#1317)
- VSCode: fixed builtin documentation files (api-docs.json) not being downloaded, leading to an error that documentation files do not exist
- Added command
Luau: Compute CodeGen instructions for fileto emit annotated codegen instructions, similar to the bytecode command. External editors can implement this by using theluau-lsp/codeGenrequest. (#617) - Added support for requiring YAML files (
.yamland.yml) as Luau data modules, similar to existing JSON and TOML support (#1267) - Implemented quick fix code actions for common diagnostics (#439):
GlobalUsedAsLocal: Addlocalkeyword to fix accidental global variableLocalUnused,FunctionUnused,ImportUnused: Prefix with_to silence, or remove the unused declarationUnreachableCode: Remove unreachable code after early return/errorRedundantNativeAttribute: Remove redundant@nativeattribute- Unknown symbol errors now have a quick fix to auto-import missing modules (both string requires and Roblox instance-based requires) and services
- Misspelled property names (case mismatches) now have a quick fix to rename to the correct property
- Added source file actions "Remove all unused code" and "Add all missing requires" to perform bulk quick fixes at once
- Added support for automatic quote conversion to backticks when typing
{inside strings. This can be enabled with theluau-lsp.format.convertQuotesconfiguration option. You may need to enable on-type formatting in your editor (e.g.,format.onTypein VSCode) (#1298)
- Aliases defined in a root-level
.luaurc/.config.luauwill now be indexed at startup. As such, external alias files will now show up as part of string-require auto-imports if the file has not previously been required (#1043) - Find All References and Rename now correctly track property references through metatable
__indexchains, enabling proper support for Luau class patterns usingsetmetatableinheritance (#961) - VSCode: expanding a single line block (e.g.,
function foo() end, adding a newline to start writing the block) will now move the cursor to the correct indentation (#220)
- Fixed non-adjacent comments (such as section headers separated by blank lines) being incorrectly included in hover documentation (#310)
- Function entries correctly show as deprecated in autocomplete if they are marked with
@deprecatedattribute (#1302) - Fixed
sourcemapFileconfiguration not supporting relative paths from the workspace root (e.g.,subdir/sourcemap.json) (#1288) - Fixed auto-imports not showing up when autocompleting in array-like tables (i.e., before the
=sign has been written for a property) (#1062) - Fixed improper and missing escaping when converting JSON files to Luau data modules. Object keys and string values containing special characters (quotes, newlines, etc.) are now properly escaped (#426)
- Fixed Find All References not including properties accessed via bracket notation (e.g.,
obj["property"]) (#1084) - Fixed Rename not supporting properties accessed via bracket notation. Renaming now correctly updates both dot notation (
obj.property) and bracket notation (obj["property"]) references (#1084) - Fixed definitions or documentation files not loading when the path to the file contains non-ASCII characters (#1191)
- Ignored files that are changed externally are correctly marked as dirty internally to ensure the next typecheck will use updated source contents (#1144)
- Fixed documentation not being shown when hovering over shared properties of unioned table types. Go to Definition now also returns multiple locations when the property is defined in different union members (#1018)
Instance:IsPropertyModified()andInstance:ResetPropertyToDefault()will now typecheck and autocomplete against real properties (#1273)- Studio Plugin: You can now configure
hostin Settings to change from localhost (#1280)
- Sync to upstream Luau 0.703
- VSCode: add more pointers towards using the Studio Plugin when Rojo information is not available (#1279)
- Studio Plugin:
Settings.debugis replaced withSettings.logLevel(#1280)
- Fixed missing newline in log messages when using
luau-lsp analyze(#1284) - Fixed crash when configuring
luau-lsp.types.disabledGlobalson a global extern type property (#1286) - Changes to
.config.luauwill now correctly reset the configuration cache and reload configuration (#1277) - Studio Plugin: fixed some issues with untracking where connections are not cleaned up (#1280)
- Fixed incorrect old solver mode configured for the null workspace (default workspace when a Luau file is not part of an opened folder) when
FFlag::LuauUseWorkspacePropToChooseSolverand new solver is enabled. This would lead to features such as autocompletion not working. (#1292)
- Fixed builtin Roblox definitions no longer loading into the language server on VSCode
.config.luauresolution now respects resolution limits and timeouts (#1246)- Added
luau-lsp.completion.showKeywords(default:true) to configure whether keywords (if/then/andetc.) are shown during autocomplete (#1243) - In VSCode, You can now override the built-in Roblox definitions by configuring an entry for
@robloxinluau-lsp.types.definitionFiles - In VSCode,
luau-lsp.types.definitionFilesandluau-lsp.types.documentationFilesnow support external URLs (beginning withhttps:///http://). When an external link is used, the VSCode extension will download the types from the server. Types are cached for 1 day. You can force a redownload by runningLuau: Redownload API Typescommand (#970) - In VSCode, added
luau-lsp.server.baseLuaurcto configure a path to the baseline.luaurcfile to load across all workspaces. External editors can already access this by using the--base-luaurccommand line flag. (#1262)
- Sync to upstream Luau 0.701
- Fixed Signature Help not skipping the first 'self' argument when calling a function with method syntax (
:), where the function type was generated by a type function (#1250)
- Sync to upstream Luau 0.700
- Fix type mismatch issue for 'types.definitionsFiles' setting in VSCode (#1253)
- Reverted "Fixed auto-imports not showing up when autocompleting in array-like tables" due to it incorrectly suggesting auto-imports when indexing tables (e.g.,
local x = tbl.pro|)
- The server now accepts DataModel information from the Studio Plugin even when there is no sourcemap present (#1216)
- Added
luau-lsp.completion.imports.includedServicesandluau-lsp.completion.imports.excludedServicesto configure what services show up during auto-importing. If non-empty, only the services listed inincludedServiceswill show up. None of the services listed inexcludedServiceswill ever show up. - Added support for inline documentation comments in global type definition files (relies on name being provided in settings, see below) (#271)
- Support processing
.config.luaufile as per Luau-syntax configuration files RFC
- Sync to upstream Luau 0.698
- Auto-imports are now enabled by default. Configure
luau-lsp.completion.imports.enabledif you wish to disable it (#619) - Definitions files must now provide a name for the file in settings and command line: i.e.
--definitions:@roblox=path/to/globalTypes.d.luau. This is to support mapping global types back to their original definitions file for documentation features. Please update your LSP settings (luau-lsp.types.definitionFiles) and command line arguments. Backwards compatibility has been temporarily preserved, with random names generated. - Table properties are now prioritised above other autocomplete entries (again, fixing a dormant bug)
- Contextual keywords (
else/elseif/end) are prioritised over other autocomplete entries when inside of the relevant statement
- Fixed auto-indentation in VSCode when entering a block if there is a comment after the introduction token (e.g.,
if true then -- comment) (#1222) - Fixed auto-imports not showing up when autocompleting in array-like tables (i.e., before the
=sign has been written for a property) (#1062)
- Require graph functionality is now available on the command line, with
luau-lsp require-graph [--sourcemap PATH] <files>. There are two output modes:--output-mode=json(default) and--output-mode=dot. The JSON output is currently experimental and is subject to change. - The VSCode extension now provides a Getting Started walkthrough to guide you through common configuration to change (
platform, sourcemap, global types). You can access this walkthrough at any time by running
Luau: Open Walkthrough(#973)
- Fixed broken visualization of require graph due to missing libraries
- Hidden variadic parameters no longer show in autocomplete of functions when new type solver is enabled (#1129)
- Sync to upstream Luau 696
-
Introduced commands
Luau: View Require GraphandLuau: View Require Graph for current fileto visualise the current graph of require dependencies within a whole project, or from a specific file. The graph is visualised with dot. Custom Editor Integrations may use theluau-lsp/requireGraphrequest to get the dot data. (#1209) -
Documentation is now shown when autocompleting a property name inside of a table literal (#1180)
type Tbl = { --- Some documentation Property: number } local x: Tbl = { Prop| -- will show 'Property' with documentation 'Some documentation' }
-
Documentation is now shown when autocompleting a type reference name (#1180)
--- Some documentation type SomeType = number local x: Some| -- will show 'SomeType' with documentation 'Some documentation'
-
Find all references now works when starting from a property defined in a table type (including across files):
type SomeTable = { Property: number, -- find all references will show the usage below } local x: SomeTable local y = x.Property
-
Rename symbols now works on properties of table types (including across files)
-
Similarly, find all references on a property will now include the original table type definition if it exists. Rename will also modify this table type property name. (#1166)
- Sync to upstream Luau 0.693
- Fixed incorrect shutdown sequence leading to errors on reload (e.g., "Pending response rejected since connection got disposed", or "Stopping the server timed out") (#1210)
- Upgrade sentry-native version to fix macOS build
- Sync to upstream Luau 0.692
- Sync to upstream Luau 0.690
- TextMate grammar syntax highlighting extended to support
read/writemodifiers in tables, type functions, and highlightingbuffer/threadetc. as types (Luau.tmLanguage #18, Luau.tmLanguage #19)
- Sync to upstream Luau 0.689
- Fixed crash due to an internal data race when managing cancellation tokens
- Fixed server failing to start up due to incorrectly handling string-based RPC message IDs (#1175)
- Fixed crash on server shutdown due to deadlock
- Fixed crashes on macOS due to small thread stack sizes causing stack overflows in Luau typechecking
- The language server now supports cancellation notifications from the client. This should help in cases where the server is stuck waiting for typechecking to complete.
- Emit error cause when fetching fails to download API types
- Sync to upstream Luau 0.684
- The release artifact for Linux x86_64 is renamed from
luau-lsp-linux.ziptoluau-lsp-linux-x86_64.zip
- Autocomplete now properly respects Luau's ParenthesesRecommendation and puts the cursor inside of the parentheses when
autocompleting a function call where the arguments are all optional / any (e.g.,
require()orwait()) (#317) - Fixed autocomplete of function calls in new solver not inserting parameter names if the parameters do not have a type annotation
- Sync to upstream Luau 0.682
- Fixed missing name for
timeoutparameter in:WaitForChild()when the new solver is enabled - (Attempted) fix for memory access crashes after the sourcemap changes
- Fixed incorrect paths showing up for errors when using
luau-lsp analyze(#1146)
- Add a warning message to
luau-lsp analyzewhen--platform=robloxis set but no definitions files are provided
- Sync to upstream Luau 0.681
- Workspace diagnostics are now only updated on text document save, rather than on text document type, due to performance overhead (especially when new solver is enabled) (#1076)
- Fixed crash when retrieving the extension of a file path with an empty basename
- Fixed crash in Go To Definition and Go To Type Definition on an expression when the relevant module document could not be looked up
- Fixed an issue with lazy workspace initialization when the first processed message is a
workspace/didChangeConfiguration, causing configuration to not apply. This affects Neovim users (#1139) - Fixed auto-imports of children / descendant modules missing a
script.prefix in the generated require statement (#1135)
- Go To Definition now follows to the location of a property on a table type if the property doesn't have a real implementation (#1123)
- Go To Definition now works on properties on the result of a function call (e.g.,
unwrapinprocess.spawn(""):unwrap()) (#1123) - Go To Type Definition now follows through expressions (such as variables) better (e.g., cross module) to find the true location of the original type
- Reimplemented internal file-system calls and removed references to
std::filesystem. There should be no external differences from this change, except that non-ASCII filepaths are handled correctly on Windows - Sync to upstream Luau 0.679
- Fixed handling of non-ASCII file paths and directories on Windows (#746)
- Added
ServerInfoto theLanguageServer::onInitializeresult. .robloxrcfiles are now processed alongside.luaurcfiles for backwards compatibility with old configuration. It is recommended to still use.luaurcfor new code.FindFirstChildWhichIsAand friends now report an error if the class name provided was not found as a valid instance type.
- Sync to upstream Luau 0.678
- Removed the restriction on maximum table size when displaying during Hover etc. This is done by setting the
LuauTableTypeMaximumStringifierLengthflag value to0. Overrides for this value are still respected.
- Fixed stack overflow when looking up a property on self-referential intersection types
- Sync to upstream Luau 0.677
- Fixed requests failing when write a string require where the filename begins with disallowed names (e.g.
./con) on Windows
- Added
luau-lsp.require.useOriginalRequireByStringSemanticsto fall back to the old require-by-string semantics forinit.luaufiles to preserve backwards compatibility. This option is deprecated and may be removed at any time in the future. Note that@self-based requires remain supported with this option, allowing gradual migration to the new semantics (#1046)
- Sync to upstream Luau 0.676
- For DM types,
.Parentis now typed with a write type of "Instance" in the new solver, preventing false-positive type errors (#1039) - Renamed command "Luau: Regenerate Rojo Sourcemap" to "Luau: Regenerate Sourcemap" as it can be configured to generate sourcemaps from non-Rojo tooling
- Workspaces are initialized lazily on-demand, improving startup time for set-ups with many workspace folders. We only setup and index a workspace folder once we receive a request for that folder. (#947)
- It is no longer valid to pass
--flagand--no-flags-enabledbefore the subcommand name on the CLI: it should beluau-lsp lsp --flag:NAME=VALUE/luau-lsp lsp --no-flags-enabled.
- Fixed require-by-string failing for files named
luau(e.g,project/luau.luau) - Fixed crash during early startup where a text document update notification is already sent before the workspaces are fully configured.
- Fixed unnecessary type check when fragment autocomplete is enabled, leading to an autocomplete delay (#991)
- Fixed FFlag registration logic always enabling all FFlags (#1090)
- Fixed string require auto-imports in an
init.luaufile not resolving correctly with new require-by-string semantics. Now,@selfis correctly added when necessary. (#1030) - When importing a directory containing an
init.luaufile with string require auto-imports, we now correctly resolve to the directory name instead of todirectory/init(#1038 / #1041) init.luaufiles are no longer aware of.luaurcfiles that are its sibling on the file system (#1037)
- Internal caught but unhandled exceptions are now reported to Sentry if crash reporting is enabled
- Added progress indicator for watched files changes
- A Cloudflare page is now available to serve the type definition files and API documentations, due to GitHub
ratelimiting (#1059)
https://luau-lsp.pages.dev/type-definitions/globalTypes.None.d.luauhttps://luau-lsp.pages.dev/type-definitions/globalTypes.PluginSecurity.d.luauhttps://luau-lsp.pages.dev/type-definitions/globalTypes.LocalUserSecurity.d.luauhttps://luau-lsp.pages.dev/type-definitions/globalTypes.RobloxScriptSecurity.d.luauhttps://luau-lsp.pages.dev/api-docs/en-us.json
- Sync to upstream Luau 0.675
- Significant performance improvements to initial workspace indexing time (~3m to ~20s on 30,000 files)
- ~1160x performance improvement to Uri parsing time at scale (7.77s to 0.0067s for ~30,000 URIs)
- ~10x performance improvement to require resolution for string requires and virtual (sourcemap) -> real file paths ( 3.28s to 0.322s for ~30,000 files)
- ~1.29x performance improvement to reading files (4.5s to 3.66s for ~30,000 files)
- Fixed blowup of
linux-arm64release build size due to the inclusion of debug symbols - Fixed crash when auto imports is enabled and the file contains a require with no arguments (e.g.
local Value = require(), typically the case when in the middle of typing a require) - Fixed performance regression from previous release where type checking is being performed on document change even if workspace diagnostics is disabled
- Fixed crash where catch-all error handler attempts to send an error message with non-UTF 8 characters
- Fixed find references not showing types used as return types for functions (#1060)
- VSCode: if fetching API documentation / definitions fails, then we do not overwrite the existing file (#740)
- Implemented opt-in crash reporting for the language server. This is enabled via
luau-lsp.server.crashReporting.enabled. Note: crash reporting sends network requests to Sentry. Crash Reporting is only available on Windows and macOS, and is not enabled in Standalone mode (luau-lsp analyze).
- Sync to upstream Luau 0.674
- Added progress indicator during indexing of initial startup. Currently does not provide much detail, but does provide some feedback to indicate the server is doing work.
- VSCode: server binary location setting (
luau-lsp.server.path) now supports relative paths (#1036)
- Sync to upstream Luau 0.673
- Luau FFlags are now synced from the Studio channel rather than the main channel on VSCode, which is typically updated earlier ([#1040])
- Fixed invalid variable names created for instance-based auto-imports
- Fixed diagnostics not getting updated for dependent files when a file is edited and workspace diagnostics is enabled (#1042)
- Autocomplete in string requires now respects
luau-lsp.completion.imports.ignoreGlobsfor filtering out files to skip (e.g., one can add*.server.luauor*.client.luau) (#1014) - End autocompletion now also autocompletes missing
thenordotokens in control flow statements (e.g., pressing enter after typing justif condition) (#999)
- Sync to upstream Luau 0.672
- Color picker will now strip redundant decimal digits (i.e.
0.0000->0) (#1022) - The language server now follows the new require-by-string semantics for
init.luaufiles for file resolution and string require autocomplete (#1023)
- Fixed string-require auto imports not using aliases correctly on Windows (#1025)
- Instance-based auto-imports now use expression syntax when parts are not a valid identifier (e.g.
require(Modules["react-spring"])) (#1026) - Auto-imports no longer create invalid variable names (#1026)
- Fixed incorrect serialization of maps that are keyed by a Uri, causing commands that apply edits such as Rename to fail
- The deprecated
luau-lsp.require.fileAliasesandluau-lsp.require.directoryAliasesno longer show up in autocomplete for string requires. Use aliases as part of.luaurcinstead
- Auto-importing now supports string requires. In standard platform, string requires is the default when
luau-lsp.completion.imports.enabledandluau-lsp.completion.imports.suggestRequiresare enabled. For the Roblox platform, string require auto imports must be switched on usingluau-lsp.completion.imports.stringRequires.enabled( default:false) (#494).
- Reimplementation of string require autocomplete based off upstream Luau require work
- Updated implementation of Uris internally to handle case-insensitive file systems correctly
- Fixed diagnostics not updating on windows for Neovim or Zed due to mismatched URI cases (#988)
- Fixed "isIgnoredFile failed: relative path is default-constructed" for Neovim Windows users (#752)
- Added setting
luau-lsp.server.communicationChannelwith optionsstdio(default) orpipeto support communicating using a UNIX socket file connection instead of stdin/stdout. On the server, this is configured by passing--pipe=FILEto the command line. This is useful for attaching a debugger to the server on macOS.pipeis not supported on Windows. (#998)
- Sync to upstream Luau 0.670
- Linux runners for GitHub actions are bumped from the deprecated
ubuntu-20.04toubuntu-22.04. This may mean that release artifacts no longer work onubuntu-20.04. - Improved Studio plugin error message when attempting to connect to a server but it is not online (#982)
- VSCode extension will now strip the prefix
FFlag/DFFlag/FInt/DFIntif they were included in the overrides name (#981)
- Fixed a bug when the New Type Solver is enabled where diagnostics would not update in dependent files when a file was changed until the dependent file is modified
- Sync to upstream Luau 0.668
- Don't show function types with function kind or label details when autocompleting in a type context (#987)
- Fixed crash when registering a non-Roblox definitions file that contains classes named
Object/Instance/ServiceProvider/EnumItem(#986)
- Sync to upstream Luau 0.666
- Optimized re-indexing on changed files when large number of changes processed at once
- Watched files re-indexing now respects ignore globs specification
- Added a debounce of 1s on file changes triggering sourcemap generation when
luau-lsp.sourcemap.useVSCodeWatcheris enabled - Fixed crashing due to bad memory access when hovering over an imported type reference due to documentation computation
- Fixed sources of crashing and flakiness when hovering + go to definition on imported type references in the new solver
- Reduced the need to run 2 type checks unnecessarily on files when the new type solver is enabled
- Documentation comments now attach to type alias definitions (#956)
- VSCode: Introduced
luau-lsp.sourcemap.generatorCommandto run a custom generator for updating the sourcemap. Accepts a shell command. If undefined (default), then falls back to usingrojo. (#968) - VSCode: Introduced
luau-lsp.sourcemap.useVSCodeWatcher(default:false). When enabled, the extension will connect to VSCode file added / removed events for retriggering the generator. When disabled (default), the extension delegates to the generator process for watching. When usingrojo, this option controls the--watchflag. - VSCode: Documentation now supports HTML syntax (#964)
- Sync to upstream Luau 0.665
- VSCode: Improved error reporting when the Studio Plugin sends a result that is too large. The error now includes the size limit, the received size, and steps to resolve the issue (#969)
- The language server will no longer attempt to remove HTML tags from documentation (#964)
- Added configuration
luau-lsp.types.disabledGlobalsto support removing globals from the main scope for analysis. Accepts a list of libraries or library methods (e.g.,table,string.split, etc.) (#888)
- Sync to upstream Luau 0.663
- Improved error reporting when the studio plugin server in VSCode fails to start up (typically due to port already in use) (#936)
- Fixed an issue where lint warnings would suddenly disappear when typing characters / saving a file, and only reappear after further edits
- Autocompleting a table property that matches a keyword will now autocomplete correctly with braces (i.e.,
t.then->t["then"]) (#937)
- Sync to upstream Luau 0.661
- Fixed unintended bump of minimum supported macOS version in 1.39.0 to macOS 14. The language server binary supports a minimum version of macOS 10.15
- Single-line documentation comments (
---) now correctly preserve newlines (#917). - Fixed stack-use-after-free crash in sourcemap definition magic functions when the new solver is enabled (#928)
- Fixed server failing to start up due to attempting to run an invalid path as the server binary
- Added configuration
luau-lsp.server.path(default:"") which allows the use of locally installedluau-lspbinaries. (#897) - Auto-import require path information is added in
CompletionItem.labelDetails.descriptionas well as just inCompletionItem.detail - In VSCode, the opening brace
{character will be automatically closed with a}character when completed within an interpolated string. This occurs when the{character is typed just before whitespace or a`character (#916). - Added support for Luau's fragment autocomplete system. This can be enabled by configuring
luau-lsp.completion.enableFragmentAutocomplete(default:false). This incremental system can lead to performance improvements when autocompleting. - The
luau-lsp.ignoreGlobsandluau-lsp.types.definitionFilesconfiguration from a settings JSON file will now be applied when runningluau-lsp analyze --settings file.jsonon the command line (#892)
- Sync to upstream Luau 0.660
- Fixed erroneous
unknown notificated method: $/plugin/fullmessage in logs even though plugin message was handled - Linux ARM releases are now built on arm-based GitHub runners, and hence should support Linux ARM properly
- Sync to upstream Luau 0.656
- Auto-import requires will now show the require path in the details section rather than just "Auto-import". This will help to disambiguate between multiple modules with the same name but at different paths. (#593)
- Added configuration
luau-lsp.inlayHints.hideHintsForErrorTypes(default:false) to configure whether inlay hints should be shown for types that resolve to an error type (#711) - Added configuration
luau-lsp.inlayHints.hideHintsForMatchingParameterNames(default:true) to configure whether inlay hints are shown where a variable name matches the parameter (#779) - Find all references of a returned function / table in a module will now return all cross-module references (#879)
- Go To Definition inside of a require call will now lead to the required file, similar to Document Link. This is useful for editors that do not support Document Link (#612)
- The recursive parameter in
game:FindFirstChild("ClassName", true)is now supported for DataModel awareness. We recursively find the closest descendant based on BFS (#689) - We now attach a semantic token modifier to usages of
selfin non-colon function definitions (i.e.function T.foo(self, ...)) ifselfis the first argument (#456)
- The server no longer computes
relatedDocumentsin atextDocument/diagnosticrequest unnecessarily if the client does not support related documents - Go To Definition on a cross-module function reference will now only resolve to the function definition, rather than
also including the require statement
local func = require(path.to.function)(#878). - Overhauled the globbing mechanism leading to significant performance improvements in indexing, workspace diagnostics,
and auto suggest requires, removing globbing as a bottleneck. Some results in example codebases ranging from 190 to
1900 KLoC:
- Initial indexing: ~3.32x to ~7.1x speedup (43.60s -> 13.12s and 9.42s -> 1.33s) (#829)
- Workspace diagnostics: ~2.39x to ~4.75x speedup (164.93s -> 69.07s and 8.49s -> 1.79s)
- Auto-suggest requires: ~4.77x speedup (1.15s -> 0.24s) (#749)
- These improvements heavily depend on the amount of code you have matching ignore globs. Workspace diagnostics improvements depends on the performance of Luau typechecking.
- Fixed isIgnoredFile check failing due to mismatching case of drive letter on Windows (#752)
- Fixed
luau-lsp analyze --ignore GLOBnot ignoring files matching the glob if the files are within one of the provided directories (#788) - Fixed production VSCode extension failing to find server binary when debugging another VSCode extension (#644)
- The Studio Plugin settings configuration is now stored in TestService instead of AnalyticsService to allow it to persist across sessions (#738)
- The Studio Plugin now correctly sends updates to the language server when an instance changes name or ancestry hierarchy (#636)
- Fixed Studio Plugin leaking Instance connections after disconnecting from server
- The VSCode extension now registers a JSON schema for
.luaurcfiles, providing simple diagnostics and intellisense (#850)
- Sync to upstream Luau 0.655
- Fixed
luau-lsp analyze --settings=...crashing when a malformed settings JSON file is provided. Now, it will print the json error and continue assuming the settings did not exist - Fixed regression in require by string autocompletion failing to correctly autocomplete files under directories (#851)
- Autocompletion in string requires will now show aliases in their original case defined in
.luaurc, rather than all lowercased
luau-lsp.require.fileAliasesandluau-lsp.require.directoryAliasesare now deprecated in favour of aliases in.luaurcfiles. These settings will be removed in a future version.
- Added a setting to enable the new solver without having to tinker with FFlags:
luau-lsp.fflags.enableNewSolver. - Support parsing and resolving aliases coming from
.luaurcfiles in module resolution and autocomplete - Added two configuration options
luau-lsp.diagnostics.pullOnChangeandluau-lsp.diagnostics.pullOnSaveto configure when document diagnostics updates for a file (default:true)
workspace/diagnosticcall is ~98% faster whenluau-lsp.diagnostics.workspaceis disabled on large projects (#826)- Sync to upstream Luau 0.653
- Removed
luau-lsp.require.modein preparation for Luau's new require by string semantics. The default is now relative to the file the require is from.
- Added bracket pairs colorization for
<>for generic types - Added configuration option
luau-lsp.sourcemap.sourcemapFileto specify a different name to use for the sourcemap - A function call on a table with a
__callmetamethod will now show Signature Help and documentation (#724) - We now warn about non-alphanumeric FFlag names, and trim any leading/trailing whitespace in FFlag configuration on the VSCode extension (#648)
- Sync to upstream Luau 0.650
- Fixed autocompletion, type registration, hover types/documentation, and some crashes for cases where the new solver is enabled
- Fixed the refinement for
typeof(inst) == "Instance"sinceObjectbecame the root class type (#814) - Fixed inlay hints incorrectly showing for first parameter in static function when the function is called as a method (
with
:) (#766) - Fixed bracket pair completion breaking inside of generic type parameter list (#741)
- Don't show aliases after a directory separator is seen in require string autocompletion (#748)
- Fixed crashing of overload resolution in signature help when new solver is enabled (#823)
- Sync to upstream Luau 0.649
- Fixed internal handling of Roblox datatypes segfaulting due to introduction of "Object" class
- Sync to upstream Luau 0.646
- Fixed a regression in 1.30.0 breaking type definitions files that rely on mutations like
Enum.Foo(#658)
- Sync to upstream Luau 0.644
- The VSCode extension will now sync flags beginning with
FIntLuau,DFFlagLuauandDFIntLuau(previously it would only syncFFlagLuau)
- Sync to upstream Luau 0.642
- Fixed a regression in 1.32.2 breaking resolution of virtual paths from real paths, particularly around
scriptand relative usages of it. (#734, #735)
- Sync to upstream Luau 0.638
- Fixed a regression in 1.32.0 causing
luau-lsp.ignoreGlobsandluau-lsp.completion.imports.ignoreGlobsto not work (#719) - Fixed auto-imports injecting a require in the middle of a multi-line require when introducing a require with lower lexicographical ordering (#725)
- Fixed documentation not showing for properties of an intersected type table in Hover and Autocomplete (#715)
- Sync to upstream Luau 0.635
- Fixed
:FindFirstChild()returningInstanceinstead ofInstance?when applied to DataModel types - Fixed
:FindFirstChild()not supporting a boolean "recursive" 2nd parameter on DataModel types (#704) - Fixed
:WaitForChild()not supporting a number "timeout" 2nd parameter on DataModel types (#704) - Fixed inlay hint off-by-one on a function definition with an explicit self (i.e.,
function Class.foo(self, param)) (#702) - Fixed
:GetPropertyChangedSignal()still showing children in autocomplete for DataModel types (#699) - Fixed grandparent's children showing up in autocomplete of FindFirstChild
- Fixed tilde expansion (
~) for paths to home directory not working in VSCode (#707)
- Support tilde expansion (
~) to home directory for definition and documentation file paths - Added a datamodel-aware
WaitForChildfunction - We now apply a datamodel-aware
FindFirstChildfunction to the top level datamodel and service types (#543) - Added autocompletion of children to
:FindFirstChild("")and:WaitForChild("")(#685) - Attached magic function to
Instance.fromExistingto allow it to operate similar toinst:Clone(#678) - Added separate configuration
luau-lsp.completion.imports.ignoreGlobsto filter out files for auto-importing. We no longer checkluau-lsp.ignoreGlobs. (#686) - Diagnostics will now refresh when the Studio plugin sends updated DataModel information (#637)
- Sync to upstream Luau 0.634
- Reverted "configuration in initializationOptions" and reintroduced messages postponing due to crashes in clients that do not send initial config
- Fix static linking with MSVC Runtime for release binaries
- Fixed clients that do not support pull diagnostics erroring with "server not yet received configuration for diagnostics"
- Don't show children in autocomplete for
:GetPropertyChangedSignal("")(#684) - Fixed autocomplete end not working for non-local functions (#554)
- Fixed extension failing to get types information on macOS with "'fetch' is not defined"
- Fixed crashes under new type solver due to internal removal of different type inference for autocomplete/non-autocomplete contexts (#692)
- Fixed crashes where internally we fail to normalise a "virtual path" from a sourcemap to a real path, causing it to mismatch with the filepath understood by VSCode, leading to desync in internal file state. (#645)
- The binary on Windows now statically links to the MSVC Runtime to make it more portable (#657)
- Fixed Roblox types still showing when setting
luau-lsp.platform.typeto something other thanroblox. (#668)
- Sync to upstream Luau 0.632
- Language clients are recommended to send configuration during intializationOptions ( see https://github.com/JohnnyMorganz/luau-lsp/blob/main/editors/README.md for details)
- Removed need for postponing requests whilst waiting for platform configuration (relies on clients sending config in intializationOptions)
- Fixed crashes occuring for users without the MSVC Redistributable installed due to introduced dependency on Windows headers (#657)
- Fixed use-after-free when generating sourcemap types
- Deprecated
luau-lsp.types.robloxsetting in favour ofluau-lsp.platform.type
- Added
luau-lsp.platform.typeto separate platform-specific functionality from the main LSP - Added option
--platformto analyze CLI to make configuringluau-lsp.platform.typemore convenient - Added support for registering FFlags for the server via initializationOptions, rather than on the command line (#590)
- Added
luau-lsp.inlayHints.makeInsertable(default:true) to configure whether inlay hint type annotations can be inserted by clicking (#620) - Added inlay hints for varargs parameter type (#622)
- Added setting
luau-lsp.plugin.maximumRequestBodySize(default:3mb) to configure the maximum size of the payload accepted from the Studio Plugin - Added support for requiring
.tomlfiles - Added syntax highlighting for
luauin markdown fenced codeblocks
- Sync to upstream Luau 0.631
- An indexed expression will no longer show an inlay hint if the index matches the parameter name (i.e.,
call(other.value)won't addvalue:inlay hint) (#618) - Studio Plugin will now perform Gzip compression on sent requests
- Overloaded methods (typed as an intersection of function types with explicitly defined
self) are now correctly marked withmethodsemantic token (#574) - Fixed semantic token highlighting overrides for global variables
- Improved robustness for non-ASCII filesystem paths in file lookup and directory traversal
- Sync to upstream Luau 0.626
- Type aliases now show generics in the type hover (#591)
- Fixed 'find all references' not working for a global function declared in a file
- Likewise, rename now supports global functions defined in a file (#568)
- Bytecode display will now show type info information. Added setting
luau-lsp.bytecode.typeInfoLevel(default: 1) to configure the type info level shown. - Added "magic functions / refinements" support under the New Solver (i.e., special handling of :IsA, : FindFirstChildWhichIsA, :Clone, etc.)
- Sync to upstream Luau 0.625
- Improved memory usage of document and workspace diagnostics by no longer storing type graphs
- Rewritten the Luau grammar syntax: https://github.com/JohnnyMorganz/Luau.tmLanguage
- Fixed autocompletion of strings with '/' characters causing the prefix to be duplicated rather than replaced (#607)
- Fixed bug with string requires where a required files types may not correctly update when the file contents changed
- Fixed macos release build
- Sync to upstream Luau 0.615
- Non-function properties will now no longer be shown by default when autocompleting a method call (e.g.,
foo:bar). To revert back to the original behaviour, enableluau-lsp.completion.showPropertiesOnMethodCall - Support Ubuntu 20.04
- Autocompletion of variables that hold a class type will now correctly have a kind of "variable" rather than "class"
- Introduced a fix for orphaned
rojoprocesses after VSCode has closed FindFirstAncestormethod now correctly finds the project root in non-DataModel projects- Fixed bad handling of unicode in filesystem paths causing crashes on server startup
- Gracefully handle filesystem errors when visiting directories for indexing / workspace diagnostics
- Sync to upstream Luau 0.609
- Switched to memory-efficient implementation of workspace diagnostics (currently behind FFlag
LuauStacklessTypeClone3) - Improved handling of configuration info received from non-VSCode clients
- Functions with explicitly defined
selfparameters are correctly marked with themethodsemantic token
- Autocompletion items for items marked as
@deprecatedvia documentation comments will now reflect their deprecated status - Show string literal byte length and utf8 characters on hover
- Support passing
--settingstoluau-lsp lspconfiguring the default global settings to use - Added support for viewing textual bytecode and compiler remarks using commands
Luau: Compute Bytecode for fileandLuau: Compute Compiler Remarks for file. This opens up a new view with bytecode/remarks inlined as comments in the source file- Added configuration
luau-lsp.bytecode.vectorLib,luau-lsp.bytecode.vectorCtorandluau-lsp.bytecode.vectorTypeto configure compiler options when generating bytecode - Custom editors should handle the
luau-lsp/bytecodeandluau-lsp/compilerRemarksLSP message to integrate compiler remarks info in their editor
- Added configuration
- Added
luau-lsp.types.robloxSecurityLevelto select what security level to use for the API types, out of:None,LocalUserSecurity,PluginSecurityandRobloxScriptSecurity
- Sync to upstream Luau 0.607
- Made rename operation fully backed by find all references, to ensure both return results that are consistent with each other
- Hide return type hints for no-op functions
- Changed the VSCode registered language and grammar ID from
luatoluau. **NOTE: ** this may affect existing custom themes! - Renamed
script/globalTypes.d.luatoscript/globalTypes.d.luau(the old file will be kept temporarily for compatibility) - Default security level of API types changed from
RobloxScriptSecuritytoPluginSecurity- setluau-lsp.types.robloxSecurityLeveltoRobloxScriptSecurityto see original behaviour - Improved warning message when Rojo not found when attempting to generate sourcemap, with option to configure settings to disable autogeneration
- Fixed Find All References / Rename not working on a table property defined inline, such as
namein:
local T = {
name = "string"
}- Fixed methods and events showing up in "GetPropertyChangedSignal" autocomplete
- Fixed requiring a directory containing "init.lua" not working
- Fixed go to definition on a property of a table that stores a cross-module type value (e.g. the result of a function defined in another module)
- Added support for documentation comments on table type properties:
type Foo = {
--- A documentation comment
map: () -> ()
}- We now show the file path in the completion description when auto-requiring files
- Sync to upstream Luau 0.604
- Overhauled command line argument parsing system to be more consistent and flexible
- Deprioritized
loadstringin autocomplete luau-lsp.diagnostics.strictDatamodelTypesnow defaults tofalseon the language server side (note, it was already defaultfalsein VSCode). Defaulting totruewas unintentional. This will affect external language client users (e.g. neovim)- Analyze CLI tool now respects
luau-lsp.diagnostics.strictDatamodelTypesif set in the provided configuration. The flag--no-strict-dm-typesstill remains for backwards compatibility reasons, but is now deprecated.
- Attempting to rename a generic type parameter now correctly renames it in all locations
- Fixed renaming a local variable not appropriately renaming any imported types
- Auto-import requires will now show the full codeblock that will be inserted, rather than just the first line if also inserting a service
- Sync to upstream Luau 0.599
- Prioritise
game:GetService()as the first autocompletion entry when typinggame: - Code blocks in hover and documentation now use
luauas the syntax highlighting
- Do not add line separator in hover when there is no text documentation
- Fixed init files not working with directory aliases (e.g.
require("@dir")orrequire("@dir/subdir"))
- Sync to upstream Luau 0.594
- Support autocomplete end on
doblocks
- Fixed crash when attempting to Go To Definition of an imported type
- Sync to upstream Luau 0.592
- Simplified Instance.new and game:GetService calls internally and in the definitions file to reduce complexity issues in the typechecker.
- Fixed cleanup of rojo sourcemap generation process when VSCode exits
- Fixed color presentations values being unclamped causing errors in other editors
- Fixed newline not added to separate services and requires when the suggestion imports both at the same time
- Added command
luau-lsp.reloadServerto restart the language server without having to reload the workspace
- Sync to upstream Luau 0.589
- Changes to settings which require server restart will now reload the server instead of having to reload the whole VSCode workspace
- Switch to Rojo
rojo sourcemap --watchcommand for sourcemap autogeneration. Note that on rojo error, you must manually restart sourcemap regeneration. Requires Rojo v7.3.0+
- Reverted change to type checking in 1.22.0 that reduced memory footprint. This should resolve the problems where
diagnostics aren't showing with an InternalCompilerError, at the cost of increased memory use if
luau-lsp.diagnostics.workspaceis enabled. - Fixed string require resolution when the string had a secondary extension:
Module.modwill be resolved asModule.mod.luau - Fixed resolution of directory aliases pointing to relative paths
- Sync to upstream Luau 0.584
- Removed need for typechecking for operations that don't require the type information (e.g., document link / color)
- Fixed diagnostics not showing when working in a new file with no workspace open
- Fixed race condition where sometimes the server does not receive user configuration on initial load, falling back to defaults
luau-lsp.fflags.overridewill now be parsed when using CLI analyze settings. Note that the otherfflagsoptions are not supported in CLI analyze mode- Fixed semantic tokens segfault crash on some tables
- Fixed duplicate definitions showing in the Go To Definition page
- Fixed some syntax highlighting inconsistencies
- Added a temporary fix to "RecursionLimitException" exceptions leaking to the public interface.
- Support requiring directories with
init.luau(orinit.lua) files inside of them. i.e.require("../Directory")resolves to../Directory/init.luau. - The CLI analyze now accepts a parameter
--settings=path/to/settings.jsonwhich takes in LSP-style settings to configure features such as require settings. Note: this is separate to.luaurc
- Significant improvements to memory usage in large workspaces when workspace indexing or diagnostics are enabled
- Sync to upstream Luau 0.582
- Deprioritise file or directory aliases over exact paths in autocomplete, since typically aliases start with a prefix (
e.g.
@) - Signature Help is more intelligent about providing information about the best function overload which matches
- Fixed language features not working in new untitled files
- Fixed incorrect color conversions in the color picker between RGB/HSV/Hex
- Fixed autoimporting modules not respecting multiline requires
- Fixed documentation for
debugandutf8library - Fixed synthetic
typeof()showing up in signature help for builtin tables (e.g.function typeof(string).byte(...)) - Fixed signature help highlighting for
stringlibrary - Fixed rename symbol on a type definition
type NAME = ... - Fixed file and directory aliases not being canonicalised to absolute paths causing "Follow Link" to fail when using relative alias paths
- Don't show directory aliases after the first path segment has been typed
- Fixed rename symbol not working when triggered at the end of a symbol
- Fix indentation of autocomplete end when autocompleting inside of a function call
- Deprecated
luau-lsp.autocompleteEndsetting in favour ofluau-lsp.completion.autocompleteEnd
- Added folding ranges for multi-line function definitions, so long parameter lists can be collapsed
- Added notification when we detect definitions file changes
- Added support for auto-requiring modules when autocompleteing a type reference, to allow indexed types: i.e.
autocompleting
Moduleintype Foo = Module.Bar - Added
luau-lsp.require.directoryAliasesto map require string prefixes to directories - Added tilde expansion to
luau-lsp.require.fileAliases(anddirectoryAliases), mapping~/foo.luato a file in your home directory - End autocompletion will now work for defined anonymous functions inside of function calls
- Sync to upstream Luau 0.580
- Updated workspace indexing strategy to minimise memory usage. We no longer index ignored files (
luau-lsp.ignoreGlobs), and there is a settingluau-lsp.index.maxFiles(default: 10,000) to configure the amount of files indexed before backing off.
- When editing in model projects, we now force relative requires, instead of incorrect absolute requires using a " ProjectRoot"
- Fixed internal error for LazyType unwrapping
- Fixed bug in semantic tokens system causing language server crashes
- 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.fileAliasesto statically provide custom mappings from string requires to a file path. For example, adding@example/constantsmapping toC:/fakepath/constants.luauwill 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 .. endfunction() .. endetc. - Tables, and type tables
x = { .. } - Multiline function calls
foo(..) - Block comments
--[[ .. ]] - Custom comment regions denoted using
--#regionand--#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.
- Sync to upstream Luau 0.575
- Fixed forced expressive types in diagnostics
- Added option
--no-strict-dm-typesfor analyze CLI to disable strict datamodel types and its associated false positives
- Fixed regression in DataModel item autocompletion
- Deprecated config
luau-lsp.completion.suggestImports: useluau-lsp.completion.imports.enabledinstead
- Added setting
luau-lsp.index.enabledwhich 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.enabledmust be enabled for full support. - Added support for renaming table properties across files. If
luau-lsp.index.enabledis disabled, this feature is disabled for correctness reasons. - Added support for renaming types (both local and exported). If
luau-lsp.index.enabledis 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)
- 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.enabledto be enabled for full support.
- 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").
- 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.
- Added support for changing
Color3colors 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.
- 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
endTo 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.
- Sync to upstream Luau 0.566
- Don't autocomplete another set of parentheses on a function call if they already exist
- Fix
.luaurcin current working directory not taken into account when callingluau-lsp analyze
- Added two code actions:
Sort requiresandSort 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
}- Sync to upstream Luau 0.563
- Prioritised common services and Instance properties/methods in autocomplete so that they show up first
- Further fixes to document symbols failing due to malformed ranges
- Fixed document symbols crashing due to internal malformed data
- Changed internal representation of documents to reduce the likelihood of Request Failed for "No managed text document"
- Fixed document symbol crash on incomplete functions
- Fixed
--base-luaurcnot registering for an LSP server - Fixed crashing on invalid FFlags configuration - the VSCode client will now validate the flags
- Fixed error in document symbols not conforming to specification -
selectionRangewill now be fully enclosed byrange
- Support documentation comments attached to a table and table types, e.g. on
DATAin the followign:
--- Doc comment
local DATA = {
...
}
--- Doc comment
type Contents = {
...
}- Include documentation comments on functions and tables in autocompletion
- Added configuration option
luau-lsp.require.modeto configure how string requires are resolved. It can either berelativeToWorkspaceRoot(default) orrelativeToFile - Added
luau-lsp.types.documentationFilesto 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 asany, which helps to prevent false positives, but may lead to false negatives. - Added CLI option
--base-luaurc=PATHfor both LSP and Analyze mode to provide a path to a.luaurcfile which is used as the default configuration - Added support for Go To Definition / Type Definition on imported type references
module.Type(gated behind FFlagSupportTypeAliasGoToDeclaration)
- 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 excepts 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 lspnow supports passing multiple--docs=parameters - The CLI will now error when an unknown option is passed to it
- Diagnostics will now be emitted on
.luaurcfiles with parse errors
- 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)
- Added syntax highlighting support for interpolated strings
- Added color viewers for Color3.new/fromRGB/fromHSV/fromHex
- Added support for autocompleting require-by-string functions with files and folders
- Support documentation comments on variables:
--- documentation comment
local x = "string"
--- another doc comment
local y = function()
end- Support documentation comments on table properties, such as the following:
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"- Sync to upstream Luau 0.558
- All Luau FFlags are no longer enabled by default. This can be re-enabled by configuring
luau-lsp.fflags.enableByDefault. It is recommended to keepluau-lsp.fflags.syncenabled so that FFlags sync with upstream Luau - Allow variable number of
=sign for multiline doc comments, so--[[and--[===[etc. are valid openers
- Luau analyze now exits with code 0 if there are no reported errors (all errors are ignored)
require(instance:FindFirstChild("Testing", true))will no longer resolve as an immediate child of instance due to the recursive argument- Fixed a bug where internally the wrong pointer to an Instance type was being used for DM nodes which manifested into
failed unification and
nevertypes - Constant variables will now be syntax highlighted appropriately at definition site (
local CONSTANT)
- Sync to upstream Luau 0.556 (fixes crashing problems)
- Sync to latest language client
- Sync to upstream Luau 0.555 (in particular, this has improvements to class definitions)
- Sync to upstream Luau 0.554
- Fixed stack overflow when looking up properties on a table type where the
__indexis set to itself
- Show inlay hints for variables in
for x in yloops
- 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.addParentheseswhenfillCallArgumentsis 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.addParenthesesandluau-lsp.completion.addTabstopAfterParenthesesto 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
.luaurcchanges
- 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=GLOBtoluau-lsp analyzeallowing 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 (
__indexetc.) in autocomplete
- Fixed inlay hints not showing for variable types when
hover.strictDataModelTypesis 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
selfincorrectly 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
scriptnodes. Improved autocomplete will now be provided for non-DataModel projects (e.g.Toolas 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.jsonfile 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
gamewill now correctly show in autocomplete - Fix autocomplete of non-identifier properties:
Packages._Index.roblox_roact-rodux@0.2.1->Packages._Index["roblox_roact-rodux@0.2.1"] - Fixed mapping of requires from
game.Players.LocalPlayer.PlayerScriptstogame.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: tblwill 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 analyzewould not exit with non-zero error code when definitions failed to load - Fixed
luau-lsp analyzewould 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,:FindFirstAncestorand:FindFirstDescendanthave been changed to returnInstance? :GetActoris fixed to returnActor?- Fixed bug when using
--definitions=when callingluau-lsp analyze
- Fixed
selfbeing 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.workspacefor 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 Sourcemapcommand to force regeneration of a Rojo sourcemap - Improved case where project file
default.project.jsonwas 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.enabledoption which dictates whether sourcemap-related features are enabled - Diagnostics will now be provided for definitions files which errored
- Added
luau-lsp.sourcemap.rojoPathto 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/gamefor 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
workspacediagnostics 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.enableByDefaultor--no-flags-enabledcommand 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.Fontinstead 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
.luaurcandsourcemap.jsonare now registered on the server side
- Fixed requiring modules when using
:FindFirstAncestor("Ancestor") - Fixed requiring modules in
LocalPlayer.PlayerGui/LocalPlayer.PlayerScripts/LocalPlayer.StarterGear - Changing
.luaurcconfiguration will now refresh the config cache and update internally
- Player will now have
PlayerGui,Backpack,StarterGearandPlayerScriptschildren, 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: Typeshowing 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
Rojocommand 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
rojobeing available to execute in the workspace folder (i.e., on the PATH), withrojo sourcemapcommand 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
selfwill 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.luaand 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.jsonpresent in root
- Bug Fixes
- Initial basic release