diff options
Diffstat (limited to 'runtime/doc/lsp.txt')
-rw-r--r-- | runtime/doc/lsp.txt | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index c1d7f3a45a..78100d5277 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -51,15 +51,14 @@ Starting a LSP client will automatically report diagnostics via |vim.diagnostic|. Read |vim.diagnostic.config| to learn how to customize the display. -To get completion from the LSP server you can enable the |vim.lsp.omnifunc|: -> - vim.bo.omnifunc = 'v:lua.vim.lsp.omnifunc' -< -To trigger completion, use |i_CTRL-X_CTRL-O| - -To get features like go-to-definition you can enable the |vim.lsp.tagfunc| -which changes commands like |:tjump| to utilize the language server and also -enables keymaps like |CTLR-]|, |CTRL-W_]|, |CTRL-W_}| and many more. +It also sets some buffer options if the options are otherwise empty and if the +language server supports the functionality. + +- |omnifunc| is set to |vim.lsp.omnifunc|. This allows to trigger completion + using |i_CTRL-X_CTRL-o| +- |tagfunc| is set to |vim.lsp.tagfunc|. This enables features like + go-to-definition, |:tjump|, and keymaps like |CTRL-]|, |CTRL-W_]|, + |CTRL-W_}| to utilize the language server. To use other LSP features like hover, rename, etc. you can setup some additional keymaps. It's recommended to setup them in a |LspAttach| autocmd to |