Fork me on GitHub


A community-driven vim distribution

Home | About | Documentation | Development | Community | Sponsors

Available Layers » lsp


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

we also include vim-lsp, which is wrote in pure vim script.

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 works well in different version of vim/neovim, so in the features, the logic of this layer should be:

if has('nvim')
  " use neovim build-in lsp
elseif has('python3')
  " use LanguageClient-neovim
  " use vim-lsp


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


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

  name = "lsp"

Install language server


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


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

  name = "lsp"
  filetypes = [

default language server commands:

language server command
javascript ['javascript-typescript-stdio']
sh ['bash-language-server', 'start']
typescript ['typescript-language-server', '--stdio']
haskell ['hie', '--lsp']
c ['clangd']
cpp ['clangd']
html ['html-languageserver', '--stdio']
objc ['clangd']
objcpp ['clangd']
dart ['dart_language_server']
go ['go-langserver', '-mode', 'stdio']
rust ['rustup', 'run', 'nightly', 'rls']
python ['pyls']
php ['php', 'path/to/bin/php-language-server.php']
julia ['julia', '--startup-file=no', '--history-file=no', '-e', 'using LanguageServer; server = LanguageServer.LanguageServerInstance(STDIN, STDOUT, false); server.runlinter = true; run(server);']
purescript ['purescript-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

Hosted on GitHub, Help improve this page — Theme by mattgraham,