aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/handlers.lua
diff options
context:
space:
mode:
authorMatthieu Coudron <teto@users.noreply.github.com>2021-02-22 23:31:12 +0100
committerGitHub <noreply@github.com>2021-02-22 23:31:12 +0100
commit46a58b74f49939c58931c79647d8ef24a160ac30 (patch)
treefcaef32a0bce1c34a0e8ebc1a9ff4046ddb01501 /runtime/lua/vim/lsp/handlers.lua
parentfb2adadc9ef001bccd30014f71fded089bda5b5a (diff)
downloadrneovim-46a58b74f49939c58931c79647d8ef24a160ac30.tar.gz
rneovim-46a58b74f49939c58931c79647d8ef24a160ac30.tar.bz2
rneovim-46a58b74f49939c58931c79647d8ef24a160ac30.zip
feat(lsp): use vim.notify for some errors (#13992)
Diffstat (limited to 'runtime/lua/vim/lsp/handlers.lua')
-rw-r--r--runtime/lua/vim/lsp/handlers.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/lua/vim/lsp/handlers.lua b/runtime/lua/vim/lsp/handlers.lua
index 7eac3febd9..7819bddcb9 100644
--- a/runtime/lua/vim/lsp/handlers.lua
+++ b/runtime/lua/vim/lsp/handlers.lua
@@ -13,7 +13,7 @@ local M = {}
--- Writes to error buffer.
--@param ... (table of strings) Will be concatenated before being written
local function err_message(...)
- api.nvim_err_writeln(table.concat(vim.tbl_flatten{...}))
+ vim.notify(table.concat(vim.tbl_flatten{...}), vim.log.levels.ERROR)
api.nvim_command("redraw")
end
@@ -409,7 +409,7 @@ for k, fn in pairs(M) do
})
if err then
- error(tostring(err))
+ return err_message(tostring(err))
end
return fn(err, method, params, client_id, bufnr, config)