mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
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
This commit is contained in:
parent
01ae5e7c38
commit
1e10342382
@ -39,9 +39,10 @@ To check LSP clients attached to the current buffer: >
|
|||||||
*lsp-config*
|
*lsp-config*
|
||||||
Inline diagnostics are enabled automatically, e.g. syntax errors will be
|
Inline diagnostics are enabled automatically, e.g. syntax errors will be
|
||||||
annotated in the buffer. But you probably want to use other features like
|
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> <c-]> <cmd>lua vim.lsp.buf.definition()<CR>
|
||||||
nnoremap <silent> K <cmd>lua vim.lsp.buf.hover()<CR>
|
nnoremap <silent> K <cmd>lua vim.lsp.buf.hover()<CR>
|
||||||
nnoremap <silent> gD <cmd>lua vim.lsp.buf.implementation()<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> gr <cmd>lua vim.lsp.buf.references()<CR>
|
||||||
nnoremap <silent> g0 <cmd>lua vim.lsp.buf.document_symbol()<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> 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
|
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
|
|i_CTRL-X_CTRL-O| to consume LSP completion. Example config (note the use of
|
||||||
|
Loading…
Reference in New Issue
Block a user