1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-03-13 02:05:40 +08:00

doc(lsp): update lsp layer doc

This commit is contained in:
Shidong Wang 2021-10-05 23:39:59 +08:00
parent c32aa6f225
commit db34307c46
No known key found for this signature in database
GPG Key ID: 41BB7053E835C848
2 changed files with 9 additions and 21 deletions

View File

@ -20,24 +20,12 @@ lang: zh
## 模块描述 ## 模块描述
lsp 模块提供了 [language-server-protocol](https://microsoft.github.io/language-server-protocol/) 的支持, lsp 模块提供了 [language-server-protocol](https://microsoft.github.io/language-server-protocol/) 的支持,
这以模块在 [LanguageClient-neovim](https://github.com/SpaceVim/LanguageClient-neovim) 基础上做了许多定制, 默认使用的 lsp 插件为:
这一链接为一克隆的版本,需要 `+python` 支持。
同时,当你的 Vim 不支持 `+python3` 时,我们采用 [vim-lsp](https://github.com/prabirshrestha/vim-lsp) 这一使用纯 Vim 脚本书写的插件。 1. vim-lsp: for vim
2. LanguageClient-neovim: for neovim
3. built-in lsp: for neovim(>=0.5.0)
Neovim 团队也在尝试实现一个内置的 [lsp 框架](https://github.com/neovim/neovim/pull/6856),后续该框架完成后,在 Neovim 内将默认使用该框架。
在 SpaceVim 内部lsp 的框架选择逻辑大致时这样的:
```vim
if has('nvim')
" use neovim build-in lsp
elseif has('python3')
" use LanguageClient-neovim
else
" use vim-lsp
endif
```
## 模块特性 ## 模块特性

View File

@ -8,7 +8,6 @@ description: "This layers provides language server protocol for vim and neovim"
<!-- vim-markdown-toc GFM --> <!-- vim-markdown-toc GFM -->
- [Description](#description) - [Description](#description)
- [Options](#options)
- [Features](#features) - [Features](#features)
- [Install](#install) - [Install](#install)
- [Install language server](#install-language-server) - [Install language server](#install-language-server)
@ -19,11 +18,12 @@ description: "This layers provides language server protocol for vim and neovim"
## Description ## 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/).
By default, this layer use following language server client implementations:
## Options 1. vim-lsp: for vim
2. LanguageClient-neovim: for neovim
- `lsp_client` 3. built-in lsp: for neovim(>=0.5.0)
## Features ## Features