From 27ce4cdd7456f8218ecfa6e56037869776c1b3e5 Mon Sep 17 00:00:00 2001 From: wsdjeg Date: Sat, 23 Dec 2017 15:34:37 +0800 Subject: [PATCH] Update doc of lsp --- docs/layers/language-server-protocol.md | 32 ++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/docs/layers/language-server-protocol.md b/docs/layers/language-server-protocol.md index 8a0705daa..5ae0893df 100644 --- a/docs/layers/language-server-protocol.md +++ b/docs/layers/language-server-protocol.md @@ -17,10 +17,40 @@ description: "This layers provides language server protocol for vim and neovim" ## Description -This layers adds extensive support for [language-server-protocol](https://microsoft.github.io/language-server-protocol/) +This layers adds extensive support for [language-server-protocol](https://microsoft.github.io/language-server-protocol/), This layer is a heavy wallpaper of [LanguageClient-neovim](https://github.com/SpaceVim/LanguageClient-neovim) (an old fork), The upstream is rewritten by rust. + +we also want to include [vim-lsp](https://github.com/prabirshrestha/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](https://github.com/neovim/neovim/pull/6856). and the author of this PR create another plugin [tjdevries/nvim-langserver-shim](https://github.com/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: + +```vim +if has('nvim') + " use neovim build-in lsp +elseif has('python3') + " use LanguageClient-neovim +else + " use vim-lsp +endif +``` + ## Features +- Asynchronous calls +- Code completion (provided by [autocomplet](https://spacevim.org/layers/autocomplete/) layer) +- Lint on the fly +- Rename symbol +- Hover/Get identifer info. +- Goto definition. +- Goto reference locations. +- Workspace/Document symbols query. +- Formatting. +- Code Action/Fix. + +**Note:** All these features dependent on the implementation of the language server, please check the list of [Language Servers](https://microsoft.github.io/language-server-protocol/implementors/servers/) + ## Install To use this configuration layer, add `call SpaceVim#layers#load('lsp')` to your custom configuration file.