A community-driven vim distribution

Home | About | Quick start guide | Documentation | Development | Community | Sponsors

Available Layers » lsp


This layer adds extensive support for language-server-protocol, This layer is a heavy wallpaper of LanguageClient-neovim (an old fork), The upstream is rewritten in rust.

We also include vim-lsp, which is written in pure vim script.

Note that if coc is used as the autocomplete method in the autocomplete layer, it will be used as the lsp client.

The neovim team is going to implement the build-in LSP support, the PR is neovim#6856. and the author of this PR create another plugin tjdevries/nvim-langserver-shim

SpaceVim should work well in different versions of vim/neovim, so in the future, the logic of this layer should be:

if has('nvim')
  " use neovim build-in lsp
if SpaceVim#layers#isLoaded("autocomplete") && get(g:, "spacevim_autocomplete_method") ==# 'coc'
  " use coc.nvim
elseif has('python3')
  " use LanguageClient-neovim
  " use vim-lsp


Note: All these features depend on the implementation of the language server, please check the list of Language Servers


To use this configuration layer, update your custom configuration file with:

  name = "lsp"

Install language server


After installing AdaCore’s GNAT Studio, add the directory containing ada_language_server to your PATH variable. For instance, if the GNAT Studio 2020 was installed, ada_language_server is present by default in /opt/GNAT/2020/libexec/gnatstudio/als.


npm i -g bash-language-server


npm install -g javascript-typescript-langserver


pip install --user python-language-server


The LanguageServer package must be installed in Julia (0.6 or greater), i.e.

julia> Pkg.clone("")

With new package system in Julia 0.7 and above, we have a package mode in Julia REPL. in REPL, hit ] to enter the package management mode, then add LanguageServer to install the package.


npm install -g purescript-language-server


npm install vue-language-server -g


npm install -g vscode-css-languageserver-bin


gem install solargraph


npm install -g @elm-tooling/elm-language-server
npm install -g elm elm-test elm-format


To enable lsp support for a specified filetype, you may need to load this layer with filetypes option, for example:

  name = "lsp"
  filetypes = [

default language server commands:

language server command
ada ['ada_language_server']
c ['clangd']
cpp ['clangd']
crystal ['scry']
css ['css-languageserver', '--stdio']
dart ['dart_language_server']
elm ['elm-language-server']
go ['gopls']
haskell ['hie', '--lsp']
html ['html-languageserver', '--stdio']
javascript ['javascript-typescript-stdio']
julia ['julia', '--startup-file=no', '--history-file=no', '-e', 'using LanguageServer; server = LanguageServer.LanguageServerInstance(STDIN, STDOUT, false); server.runlinter = true; run(server);']
objc ['clangd']
objcpp ['clangd']
php ['php', 'path/to/bin/php-language-server.php']
purescript ['purescript-language-server', '--stdio']
python ['pyls']
ruby ['solargraph', 'stdio']
reason ['ocaml-language-server']
rust ['rustup', 'run', 'nightly', 'rls']
sh ['bash-language-server', 'start']
typescript ['typescript-language-server', '--stdio']
vue ['vls']

To override the server command, you may need to use override_cmd option:

  name = "lsp"
  filetypes = [
    rust = ["rustup", "run", "nightly", "rls"]

Key bindings

Key Binding Description
K / SPC l d show document
SPC l e rename symbol

if the checkers layer is not loaded, these key bindings will be added:

Key description
SPC e c clear errors
SPC e n jump to the position of next error
SPC e N jump to the position of previous error
SPC e p jump to the position of previous error
SPC e l display a list of all the errors
SPC e L display a list of all the errors and focus the errors buffer

Powered by Jekyll, Help improve this page