diff options
| author | Yochem van Rosmalen <git@yochem.nl> | 2025-01-19 22:08:10 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-19 13:08:10 -0800 |
| commit | d56ba71af11c9048c9085e4f66a47947770bdb29 (patch) | |
| tree | 3941bda7b1a15b99cc9c09ef05bfe21228850b4d /runtime/doc | |
| parent | a6f219b06bebf5878b970bebf53db7b942fe8731 (diff) | |
| download | rneovim-d56ba71af11c9048c9085e4f66a47947770bdb29.tar.gz rneovim-d56ba71af11c9048c9085e4f66a47947770bdb29.tar.bz2 rneovim-d56ba71af11c9048c9085e4f66a47947770bdb29.zip | |
fix(lsp): document_symbol uses loclist by default #32070
Problem: Not able to open document symbols for different buffers
Solution: Use the location list as default.
To switch back to previous behavior (qflist):
vim.lsp.buf.document_symbol({ loclist = false })
Fixes: #31832
Diffstat (limited to 'runtime/doc')
| -rw-r--r-- | runtime/doc/lsp.txt | 9 | ||||
| -rw-r--r-- | runtime/doc/news.txt | 3 |
2 files changed, 7 insertions, 5 deletions
diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index e8270123d7..fffd668919 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -1445,12 +1445,11 @@ Lua module: vim.lsp.buf *lsp-buf* vim.lsp.buf.definition({ on_list = on_list }) vim.lsp.buf.references(nil, { on_list = on_list }) < - - If you prefer loclist instead of qflist: >lua + • {loclist}? (`boolean`) Whether to use the |location-list| or the + |quickfix| list. >lua vim.lsp.buf.definition({ loclist = true }) - vim.lsp.buf.references(nil, { loclist = true }) + vim.lsp.buf.references(nil, { loclist = false }) < - • {loclist}? (`boolean`) *vim.lsp.LocationOpts* Extends: |vim.lsp.ListOpts| @@ -1553,7 +1552,7 @@ document_highlight() *vim.lsp.buf.document_highlight()* |hl-LspReferenceWrite| document_symbol({opts}) *vim.lsp.buf.document_symbol()* - Lists all symbols in the current buffer in the quickfix window. + Lists all symbols in the current buffer in the |location-list|. Parameters: ~ • {opts} (`vim.lsp.ListOpts?`) See |vim.lsp.ListOpts|. diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index ef97957d22..58902abb87 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -26,6 +26,9 @@ LSP • `lsp/` runtimepath files should return a table instead of calling |vim.lsp.config()| (or assigning to `vim.lsp.config`). See |lsp-config| +• `vim.lsp.buf.document_symbol()` uses the |location-list| by default. Use + `vim.lsp.buf.document_symbol({ loclist = false })` to use the |quickfix| + list. OPTIONS |