diff options
author | Dave Lage <rockerboo@gmail.com> | 2020-09-12 13:01:14 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-12 13:01:14 -0400 |
commit | 1e10342382c11c6b0caf87ad95988afc28c59818 (patch) | |
tree | 47c72d68692928a04e0bccd78c35a9c1ea2e9f70 | |
parent | 01ae5e7c385e2e4996db3ef217be8e0b30fb370b (diff) | |
download | rneovim-1e10342382c11c6b0caf87ad95988afc28c59818.tar.gz rneovim-1e10342382c11c6b0caf87ad95988afc28c59818.tar.bz2 rneovim-1e10342382c11c6b0caf87ad95988afc28c59818.zip |
docs: Add hint for :help vim.lsp.buf for new users (#12886)
* docs: Add hint for :help vim.lsp.buf for new users
* fix: Use help linker for vim.lsp.buf
* docs: Extend full api list language. Move gd to bottom. Add note about limited support
-rw-r--r-- | runtime/doc/lsp.txt | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index b32775bc82..44b611c2cf 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -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 |