Erlang language server.
- textDocument/definition
- Module
- Function
- Type
- Record
- Macro
- Variable
- Include file
- textDocument/formatting
- Formatting documents by using efmt
- textDocument/completion
- Fully qualified function name
- Fully qualified type name
- Record name
- Record field name
- textDocument/publishDiagnostics (when received
textDocument/{didOpen,didSave}
)- Parse errors by efmt
- Lint checks
- textDocument/rename
- textDocument/semanticTokens/full
- textDocument/semanticTokens/range
- textDocument/documentHighlight
- Variable
ErlLS can be used with any LSP clients. Here are a few examples.
Please install erlls extension.
There is no need to install the erlls
binary using the $ cargo install
command as the extension already includes the WebAssembly build.
To include the Erlang/OTP applications in the search target, please specify the directory as follows:
{
"erlls.erlLibs": "/usr/local/lib/erlang/lib/:_checkouts:_build/default/lib"
}
NOTE:
- The actual path may vary depending on the environment.
- In VSCode Web, it's not possible to search applications located outside of the workspace.
Emacs (lsp-mode)
- Install
erlls
command.
$ cargo install erlls
- Add the following code to your
.emacs
file.
(with-eval-after-load 'lsp-mode
(add-to-list 'lsp-language-id-configuration
'(erlang-mode . "erlang")))
(lsp-register-client
(make-lsp-client :new-connection (lsp-stdio-connection "erlls")
:activation-fn (lsp-activate-on "erlang")
:priority -1
:server-id 'erlls))