An implementation of a language server for the Luau programming language
The Luau Language Server is a fully-featured implementation of the Language Server Protocol for Luau, powered by Open Source Luau.
You can take the full power of Luau from Roblox Studio to any of your external editors, such as VSCode, Sublime Text, Neovim and more!
Luau LSP supports Rojo for external development (using
rojo sourcemap). It can also support any other external development mode: it just requires a
sourcemap.json to map your Roblox Instance Hierarchy to your filesystem.
Alongside the sourcemap, a Roblox Studio Companion Plugin can be used to infer more of your Instance Hierarchy, if it is not all stored on the filesystem.
- Complete Luau Diagnostics and Typechecking
- Rojo (and others) External Development Support
- Fully typed Roblox API (and Documentation)
- Autocompletion (including automatic service imports)
- Signature Help
- Inlay Hints
- Semantic Tokens
- Go To Definition / Go To Type Definition
- Find References
- Document Link
- Document Symbols
- Code Actions
- Moonwave Documentation Comments
The Luau Language Server also supports a standalone
analyze CLI tool. This means you can perform type checking separately. This can be useful in CI such as GitHub Actions.
You can download the CLI tool from GitHub Releases (with full support for Foreman/Aftman)
Once downloaded, run the tool like so:
luau-lsp analyze --definitions=path/to/globalTypes.d.lua path/to/file.luau
globalTypes.d.lua lists all type definitions loaded into the global scope. You can find an updated version here
The main difference is that the Luau Language Server is fully powered by open source Luau (GitHub - Roblox/luau: A fast, small, safe, gradually typed embeddable scripting language derived from Lua).
This means that it can take full advantage of the type engine that you find in Roblox Studio, including any future improvements or updates.
Using the Luau type engine, Luau Language Server has better knowledge about the type graph, and this leads to better IntelliSense.
Feel free to reach out on this Topic or open up an Issue / Discussion on GitHub