Step 0: Use a recent Kakoune installation
Make sure you have a recent Kakoune installation. Package managers may carry very old versions of Kakoune.
- Building Kakoune from source is easy and will give you the latest features
- If you follow the steps on this page, Erlang LS should work in Kakoune. However you will probably want to see syntax highlighting for Erlang in addition to the features that Erlang LS provides like goto definition etc. That is available only in the
Kakoune 2021.10.28tagged release (and later) or on current git sources
Step 1: Install Erlang LS
Install Erlang LS on your system. You may or may not decide to put the
erlang_ls executable on your
Step 2: Install
Install or build
kak-lsp from source by following instructions on its repository.
Step 3: Edit the
kak-lsp.toml. This file has language specific settings for the Kakoune kak-lsp plugin.
On Linux, configuration for
kak-lsp should usually live at
$HOME is your home directory.
kak-lsp.toml in your favorite editor (Kakoune 😄?), look for
[language.erlang]. It should look something like this:
[language.erlang] filetypes = ["erlang"] # See https://github.com/erlang-ls/erlang_ls.git for more information and # how to configure. This default config should work in most cases though. roots = ["rebar.config", "erlang.mk", ".git", ".hg"] command = "erlang_ls"
Tip: If you don't find
[language.erlang] your probably have an older version of
kak-lsp. Nevermind, you can add this
toml snippet yourself to
kak-lsp.toml without any issues
erlang_ls executable is on your
kak-lsp.toml if you added the above snippet and restart Kakoune.
You're done! Erlang LS should work now on Erlang projects and sources!
erlang_ls executable is not on your
command line for the
[language.erlang] section to:
command = "/the/path/to/erlang_ls"
Don't forget to save the file and restart Kakoune!