diff options
| author | Evgeni Chasnovski <evgeni.chasnovski@gmail.com> | 2023-10-31 14:18:44 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-31 13:18:44 +0100 |
| commit | adbe7f368397da21465f27181e254dd3694820e9 (patch) | |
| tree | e57b7448ff156a3a0a9a3a12d31ce9605c7bbd8e /runtime/doc | |
| parent | c1a93285d25be8c832eceecc440e6128b773dc01 (diff) | |
| download | rneovim-adbe7f368397da21465f27181e254dd3694820e9.tar.gz rneovim-adbe7f368397da21465f27181e254dd3694820e9.tar.bz2 rneovim-adbe7f368397da21465f27181e254dd3694820e9.zip | |
fix(lsp): call `on_list()` even for single location (#25830)
Problem: Currently there is no way of customizing behavior of
`declaration`, `definition`, `typeDefinition`, and `implementation`
methods in `vim.lsp.buf` when LSP server returns `Location`. Instead,
cursor jumps to that location directly.
Solution: Normalize LSP response to be `Location[]` for those four cases.
Diffstat (limited to 'runtime/doc')
| -rw-r--r-- | runtime/doc/lsp.txt | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index e62a411233..b727cff2cd 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -1179,8 +1179,8 @@ declaration({options}) *vim.lsp.buf.declaration()* • {options} (table|nil) additional options • reuse_win: (boolean) Jump to existing window if buffer is already open. - • on_list: (function) handler for list results. See - |lsp-on-list-handler| + • on_list: (function) |lsp-on-list-handler| replacing the + default handler. Called for any non-empty result. definition({options}) *vim.lsp.buf.definition()* Jumps to the definition of the symbol under the cursor. @@ -1189,8 +1189,8 @@ definition({options}) *vim.lsp.buf.definition()* • {options} (table|nil) additional options • reuse_win: (boolean) Jump to existing window if buffer is already open. - • on_list: (function) handler for list results. See - |lsp-on-list-handler| + • on_list: (function) |lsp-on-list-handler| replacing the + default handler. Called for any non-empty result. document_highlight() *vim.lsp.buf.document_highlight()* Send request to the server to resolve document highlights for the current @@ -1271,8 +1271,8 @@ implementation({options}) *vim.lsp.buf.implementation()* Parameters: ~ • {options} (table|nil) additional options - • on_list: (function) handler for list results. See - |lsp-on-list-handler| + • on_list: (function) |lsp-on-list-handler| replacing the + default handler. Called for any non-empty result. incoming_calls() *vim.lsp.buf.incoming_calls()* Lists all the call sites of the symbol under the cursor in the |quickfix| @@ -1329,8 +1329,8 @@ type_definition({options}) *vim.lsp.buf.type_definition()* • {options} (table|nil) additional options • reuse_win: (boolean) Jump to existing window if buffer is already open. - • on_list: (function) handler for list results. See - |lsp-on-list-handler| + • on_list: (function) |lsp-on-list-handler| replacing the + default handler. Called for any non-empty result. workspace_symbol({query}, {options}) *vim.lsp.buf.workspace_symbol()* Lists all symbols in the current workspace in the quickfix window. |