aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/lsp.txt
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/doc/lsp.txt')
-rw-r--r--runtime/doc/lsp.txt14
1 files changed, 9 insertions, 5 deletions
diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt
index 0300ba55b3..44b611c2cf 100644
--- a/runtime/doc/lsp.txt
+++ b/runtime/doc/lsp.txt
@@ -23,14 +23,14 @@ QUICKSTART *lsp-quickstart*
Nvim provides a LSP client, but the servers are provided by third parties.
Follow these steps to get LSP features:
- 1. Install the nvim-lsp plugin. It provides common configuration for
+ 1. Install the nvim-lspconfig plugin. It provides common configuration for
various servers so you can get started quickly.
- https://github.com/neovim/nvim-lsp
+ https://github.com/neovim/nvim-lspconfig
2. Install a language server. Try ":LspInstall <tab>" or use your system
package manager to install the relevant language server:
https://microsoft.github.io/language-server-protocol/implementors/servers/
3. Add `nvim_lsp.xx.setup{…}` to your vimrc, where "xx" is the name of the
- relevant config. See the nvim-lsp README for details.
+ relevant config. See the nvim-lspconfig README for details.
To check LSP clients attached to the current buffer: >
@@ -39,9 +39,10 @@ To check LSP clients attached to the current buffer: >
*lsp-config*
Inline diagnostics are enabled automatically, e.g. syntax errors will be
annotated in the buffer. But you probably want to use other features like
-go-to-definition, hover, etc. Example config: >
+go-to-definition, hover, etc. Full list of features in |vim.lsp.buf|.
+
+Example config: >
- nnoremap <silent> gd <cmd>lua vim.lsp.buf.declaration()<CR>
nnoremap <silent> <c-]> <cmd>lua vim.lsp.buf.definition()<CR>
nnoremap <silent> K <cmd>lua vim.lsp.buf.hover()<CR>
nnoremap <silent> gD <cmd>lua vim.lsp.buf.implementation()<CR>
@@ -50,6 +51,9 @@ go-to-definition, hover, etc. Example config: >
nnoremap <silent> gr <cmd>lua vim.lsp.buf.references()<CR>
nnoremap <silent> g0 <cmd>lua vim.lsp.buf.document_symbol()<CR>
nnoremap <silent> gW <cmd>lua vim.lsp.buf.workspace_symbol()<CR>
+ nnoremap <silent> gd <cmd>lua vim.lsp.buf.declaration()<CR>
+
+Note: Language servers may have limited support for these features.
Nvim provides the |vim.lsp.omnifunc| 'omnifunc' handler which allows
|i_CTRL-X_CTRL-O| to consume LSP completion. Example config (note the use of