1 Kakoune
Fangrui Song edited this page 2019-10-12 22:39:56 -07:00

Install kak-lsp

  1. git clone https://github.com/ul/kak-lsp
  2. cd kak-lsp; cargo install --locked --force --path .
  3. cp target/release/kak-lsp ~/.local/bin/

Configure

Change ~/.config/kak-lsp/kak-lsp.toml:

[language.c_cpp]
filetypes = ["c", "cpp"]
roots = [".ccls-root", "compile_commands.json"]
command = "ccls"
# kak-lsp does not support newText https://github.com/ul/kak-lsp/issues/40
args = ["--init={\"completion\":{\"detailedLabel\":false}}"]

Add to ~/.config/kak/kakrc:

eval %sh{kak-lsp --kakoune -s $kak_session}
hook global WinSetOption filetype=(c|cpp) %{
    lsp-enable-window
}