You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This will install the lua-lsp command. Language clients can then communicate
with this process using stdio as a transport. See editors.md for
more instructions specific to your editor of choice.
Plugins
lua-lsp automatically integrates with common lua packages, when they are
installed. For linting, install luacheck:
$ luarocks install luacheck
For code formatting, we currently support Formatter and LCF. Formatter is 5.1
only, whereas lcf is 5.3 only.
5.1:
If you have another package you'd like to see integrated, feel free to leave an
issue/PR. Other plugins are always welcome, especially if they provide
materially different results.
if lua-cjson is installed, we will optionally use it for a speed boost. It is
unfortunately not supported by all versions of lua at the moment, but as soon
as it is we will switch to making it mandatory.
$ luarocks install lua-cjson
Configuration
lua-lsp reads a few project-level configuration files to do its work.
To configure linting, we read your standard .luacheckrc file.
For autocomplete support, we reimplement the .luacompleterc format
created by atom-autocomplete-lua. In particular, we need luaVersion to
properly understand your code.
More LSP-specific configuration flags will hopefully be provided through your
editor's configuration support.
TODO
The LSP spec is big, and we don't implement all of it. here's a
quick wishlist ordered by roughly by priority/feasibility.
List references (textDocument/references)
Find symbols (workspace/symbol)
Function signature help (textDocument/signatureHelp)