aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/handlers.lua
diff options
context:
space:
mode:
authorGregory Anders <greg@gpanders.com>2021-09-06 20:21:18 -0600
committerGregory Anders <greg@gpanders.com>2021-09-15 14:09:47 -0600
commita5bbb932f9094098bd656d3f6be3c58344576709 (patch)
tree80f35362c9e94853e9e8898416120a3ede623362 /runtime/lua/vim/lsp/handlers.lua
parent6188926e00081ae4b1a33d5fd12692a6749a2144 (diff)
downloadrneovim-a5bbb932f9094098bd656d3f6be3c58344576709.tar.gz
rneovim-a5bbb932f9094098bd656d3f6be3c58344576709.tar.bz2
rneovim-a5bbb932f9094098bd656d3f6be3c58344576709.zip
refactor: move vim.lsp.diagnostic to vim.diagnostic
This generalizes diagnostic handling outside of just the scope of LSP. LSP clients are now a specific case of a diagnostic producer, but the diagnostic subsystem is decoupled from the LSP subsystem (or will be, eventually). More discussion at [1]. [1]: https://github.com/neovim/neovim/pull/15585
Diffstat (limited to 'runtime/lua/vim/lsp/handlers.lua')
-rw-r--r--runtime/lua/vim/lsp/handlers.lua10
1 files changed, 8 insertions, 2 deletions
diff --git a/runtime/lua/vim/lsp/handlers.lua b/runtime/lua/vim/lsp/handlers.lua
index 8fa6f6d024..97dd02efc2 100644
--- a/runtime/lua/vim/lsp/handlers.lua
+++ b/runtime/lua/vim/lsp/handlers.lua
@@ -210,10 +210,16 @@ local function response_to_list(map_result, entity)
else
config = config or {}
if config.loclist then
- util.set_loclist(map_result(result, ctx.bufnr))
+ vim.fn.setloclist(0, {}, ' ', {
+ title = 'Language Server';
+ items = map_result(result, ctx.bufnr);
+ })
api.nvim_command("lopen")
else
- util.set_qflist(map_result(result, ctx.bufnr))
+ vim.fn.setqflist({}, ' ', {
+ title = 'Language Server';
+ items = map_result(result, ctx.bufnr);
+ })
api.nvim_command("copen")
end
end