luau-lsp

Language Server Implementation for Luau

MIT License

Stars
232

Bot releases are visible (Hide)

luau-lsp - 1.32.4 Latest Release

Published by github-actions[bot] about 1 month ago

[1.32.4] - 2024-09-11

Changed

  • Sync to upstream Luau 0.642
luau-lsp - 1.32.3

Published by github-actions[bot] 2 months ago

[1.32.3] - 2024-08-10

Fixed

  • Fixed a regression in 1.32.2 breaking resolution of virtual paths from real paths, particularly around script and relative usages of it. (#734, #735)
luau-lsp - 1.32.2

Published by github-actions[bot] 2 months ago

[1.32.2] - 2024-08-10

Changed

  • Sync to upstream Luau 0.638

Fixed

  • Fixed a regression in 1.32.0 causing luau-lsp.ignoreGlobs and luau-lsp.completion.imports.ignoreGlobs to 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)
luau-lsp - 1.32.1

Published by github-actions[bot] 3 months ago

[1.32.1] - 2024-07-23

Changed

  • Sync to upstream Luau 0.635

Fixed

  • Fixed :FindFirstChild() returning Instance instead of Instance? 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)
luau-lsp - 1.32.0

Published by github-actions[bot] 3 months ago

[1.32.0] - 2024-07-14

Added

  • Support tilde expansion (~) to home directory for definition and documentation file paths
  • Added a datamodel-aware WaitForChild function
  • We now apply a datamodel-aware FindFirstChild function to the top level datamodel and service types (#543)
  • Added autocompletion of children to :FindFirstChild("") and :WaitForChild("") (#685)
  • Attached magic function to Instance.fromExisting to allow it to operate similar to inst:Clone (#678)
  • Added separate configuration luau-lsp.completion.imports.ignoreGlobs to filter out files for auto-importing. We no longer check luau-lsp.ignoreGlobs. (#686)
  • Diagnostics will now refresh when the Studio plugin sends updated DataModel information (#637)

Changed

  • 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

Fixed

  • 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)
luau-lsp - 1.31.1

Published by github-actions[bot] 3 months ago

[1.31.1] - 2024-07-07

Fixed

  • 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.type to something other than roblox. (#668)
luau-lsp - 1.31.0

Published by github-actions[bot] 4 months ago

[1.31.0] - 2024-07-01

Changed

Fixed

  • Fixed crashes occuring for users without the MSVC Redistributable installed due to introduced dependency on Windows headers (#657)
luau-lsp - 1.30.1

Published by github-actions[bot] 4 months ago

[1.30.1] - 2024-06-27

Fixed

  • Fixed use-after-free when generating sourcemap types
luau-lsp - 1.30.0

Published by github-actions[bot] 4 months ago

[1.30.0] - 2024-06-23

Deprecated

  • Deprecated luau-lsp.types.roblox setting in favour of luau-lsp.platform.type

Added

  • Added luau-lsp.platform.type to separate platform-specific functionality from the main LSP
  • Added option --platform to analyze CLI to make configuring luau-lsp.platform.type more 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 .toml files
  • Added syntax highlighting for luau in markdown fenced codeblocks

Changed

  • 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 add value: inlay hint) (#618)
  • Studio Plugin will now perform Gzip compression on sent requests

Fixed

  • Overloaded methods (typed as an intersection of function types with explicitly defined self) are now correctly marked with method semantic token (#574)
  • Fixed semantic token highlighting overrides for global variables
  • Improved robustness for non-ASCII filesystem paths in file lookup and directory traversal
luau-lsp - 1.29.1

Published by github-actions[bot] 5 months ago

[1.29.1] - 2024-05-19

Changed

  • Sync to upstream Luau 0.626

Fixed

  • 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)
luau-lsp - 1.29.0

Published by github-actions[bot] 5 months ago

[1.29.0] - 2024-05-11

Added

  • 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.)

Changed

Fixed

  • 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
luau-lsp - 1.28.1

Published by github-actions[bot] 8 months ago

[1.28.1] - 2024-03-04

Fixed

  • Fixed macos release build
luau-lsp - 1.28.0

Published by github-actions[bot] 8 months ago

[1.28.0] - 2024-03-03

Changed

  • 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, enable luau-lsp.completion.showPropertiesOnMethodCall
  • Support Ubuntu 20.04

Fixed

  • Autocompletion of variables that hold a class type will now correctly have a kind of "variable" rather than "class"
  • Introduced a fix for orphaned rojo processes after VSCode has closed
  • FindFirstAncestor method 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
luau-lsp - 1.27.1

Published by github-actions[bot] 9 months ago

[1.27.1] - 2024-01-20

Changed

  • Sync to upstream Luau 0.609

Fixed

  • 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 self parameters are correctly marked with the method semantic token
luau-lsp - 1.27.0

Published by github-actions[bot] 10 months ago

[1.27.0] - 2023-12-25

Important Note

Heads up! In VSCode, this release changes the registered language ID from lua to luau. If you have any configuration based on the old language ID (e.g. themes / file icons / semantic highlighting overrides / language-specific settings overrides), you may need to update them.

Added

  • Marking an item as @deprecated via documentation comments will now reflect its deprecated status in autocomplete (currently no diagnostics support)

image

  • Show string literal byte length and utf8 characters on hover

image
image

  • Added support for viewing textual bytecode and compiler remarks using commands Luau: Compute Bytecode for file and Luau: 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.vectorCtor and luau-lsp.bytecode.vectorType to configure compiler options when generating bytecode
    • Custom editors should handle the luau-lsp/bytecode and luau-lsp/compilerRemarks LSP message to integrate compiler remarks info in their editor

https://github.com/JohnnyMorganz/luau-lsp/assets/19635171/6d5ea652-7f5f-47fc-acf0-9c823a9de0a0

  • Added luau-lsp.types.robloxSecurityLevel to select what security level to use for the API types, out of: None, LocalUserSecurity, PluginSecurity and RobloxScriptSecurity
  • Support passing --settings to luau-lsp lsp configuring the default global settings to use

Changed

  • 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 lua to luau. NOTE: this may affect existing custom themes!
  • Renamed script/globalTypes.d.lua to script/globalTypes.d.luau (the old file will be kept temporarily for compatibility)
    • Please update your references to the file in custom scripts
  • Default security level of API types changed from RobloxScriptSecurity to PluginSecurity - set luau-lsp.types.robloxSecurityLevel to RobloxScriptSecurity to see original behaviour
  • Improved warning message when Rojo not found when attempting to generate sourcemap, with option to configure settings to disable autogeneration

Fixed

  • Fixed Find All References / Rename not working on a table property defined inline, such as name in:
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)

Full Changelog: https://github.com/JohnnyMorganz/luau-lsp/compare/1.26.0...1.27.0

luau-lsp - 1.26.0

Published by github-actions[bot] 11 months ago

[1.26.0] - 2023-11-19

Added

  • 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

Changed

  • Sync to upstream Luau 0.604
  • Overhauled command line argument parsing system to be more consistent and flexible
  • Deprioritized loadstring in autocomplete
  • luau-lsp.diagnostics.strictDatamodelTypes now defaults to false on the language server side (note, it was already default false in VSCode).
    Defaulting to true was unintentional. This will affect external language client users (e.g. neovim)
  • Analyze CLI tool now respects luau-lsp.diagnostics.strictDatamodelTypes if set in the provided configuration.
    The flag --no-strict-dm-types still remains for backwards compatibility reasons, but is now deprecated.

Fixed

  • 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
luau-lsp - 1.25.0

Published by github-actions[bot] about 1 year ago

[1.25.0] - 2023-10-14

Changed

  • Sync to upstream Luau 0.599
  • Prioritise game:GetService() as the first autocompletion entry when typing game:
  • Code blocks in hover and documentation now use luau as the syntax highlighting

Fixed

  • 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") or require("@dir/subdir"))
luau-lsp - 1.24.1

Published by github-actions[bot] about 1 year ago

[1.24.1] - 2023-09-09

Changed

  • Sync to upstream Luau 0.594
  • Support autocomplete end on do blocks

Fixed

  • Fixed crash when attempting to Go To Definition of an imported type
luau-lsp - 1.24.0

Published by github-actions[bot] about 1 year ago

[1.24.0] - 2023-08-26

Changed

  • 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

  • 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
luau-lsp - 1.23.0

Published by github-actions[bot] about 1 year ago

[1.23.0] - 2023-08-06

NOTE: For automatic sourcemap generation users, this release now requires Rojo v7.3.0+ is installed, with rojo sourcemap --watch support

Added

  • Added command luau-lsp.reloadServer to restart the language server without having to reload the workspace

Changed

  • 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 --watch command for sourcemap autogeneration. Note that on rojo error, you must manually restart sourcemap regeneration. Requires Rojo v7.3.0+

Fixed

  • 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.workspace is enabled.
  • Fixed string require resolution when the string had a secondary extension: Module.mod will be resolved as Module.mod.luau
  • Fixed resolution of directory aliases pointing to relative paths