diff options
author | Mathias Fußenegger <mfussenegger@users.noreply.github.com> | 2022-07-10 17:26:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-10 17:26:43 +0200 |
commit | 95c65a6b221fe6e1cf91e8322e7d7571dc511a71 (patch) | |
tree | 67411feeb8318cd7f98cd3758694e2cdd582a672 /runtime/doc | |
parent | 67b26a39f01cfd4a036070580b8ac6ccecda4a93 (diff) | |
download | rneovim-95c65a6b221fe6e1cf91e8322e7d7571dc511a71.tar.gz rneovim-95c65a6b221fe6e1cf91e8322e7d7571dc511a71.tar.bz2 rneovim-95c65a6b221fe6e1cf91e8322e7d7571dc511a71.zip |
feat(lsp): defaults: tagfunc, omnifunc (#19003)
set `tagfunc` to `vim.lsp.tagfunc` and `omnifunc` to `vim.lsp.omnifunc` if empty when attaching a server
Diffstat (limited to 'runtime/doc')
-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 |