From 1e10342382c11c6b0caf87ad95988afc28c59818 Mon Sep 17 00:00:00 2001 From: Dave Lage Date: Sat, 12 Sep 2020 13:01:14 -0400 Subject: 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 --- runtime/doc/lsp.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'runtime') 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 gd lua vim.lsp.buf.declaration() nnoremap lua vim.lsp.buf.definition() nnoremap K lua vim.lsp.buf.hover() nnoremap gD lua vim.lsp.buf.implementation() @@ -50,6 +51,9 @@ go-to-definition, hover, etc. Example config: > nnoremap gr lua vim.lsp.buf.references() nnoremap g0 lua vim.lsp.buf.document_symbol() nnoremap gW lua vim.lsp.buf.workspace_symbol() + nnoremap gd lua vim.lsp.buf.declaration() + +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 -- cgit