From a450fda4ededdd93e3dc571d82a6737f6b9d50d9 Mon Sep 17 00:00:00 2001 From: Evgeni Chasnovski Date: Thu, 23 Jan 2025 10:42:00 +0200 Subject: fix(lsp): prefer `on_list` over `loclist` in default handler Problem: setting `loclist = true` makes `on_list` being ignored. This was not a problem before, but with `vim.lsp.buf.document_symbol` using `loclist = true` as default it is needed to explicitly pass `loclist = false` in order to use custom `on_list`. Solution: prefer `on_list` over `loclist` and document the latter as taking effect only in the default handler. --- runtime/doc/lsp.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index fffd668919..351f9a56ac 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -1446,7 +1446,7 @@ Lua module: vim.lsp.buf *lsp-buf* vim.lsp.buf.references(nil, { on_list = on_list }) < • {loclist}? (`boolean`) Whether to use the |location-list| or the - |quickfix| list. >lua + |quickfix| list in the default handler. >lua vim.lsp.buf.definition({ loclist = true }) vim.lsp.buf.references(nil, { loclist = false }) < -- cgit