mirror of
https://github.com/neovim/neovim.git
synced 2025-11-06 02:34:28 +00:00
feat(lsp): use vim.notify for some errors (#13992)
This commit is contained in:
@@ -13,7 +13,7 @@ local M = {}
|
|||||||
--- Writes to error buffer.
|
--- Writes to error buffer.
|
||||||
--@param ... (table of strings) Will be concatenated before being written
|
--@param ... (table of strings) Will be concatenated before being written
|
||||||
local function err_message(...)
|
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")
|
api.nvim_command("redraw")
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -409,7 +409,7 @@ for k, fn in pairs(M) do
|
|||||||
})
|
})
|
||||||
|
|
||||||
if err then
|
if err then
|
||||||
error(tostring(err))
|
return err_message(tostring(err))
|
||||||
end
|
end
|
||||||
|
|
||||||
return fn(err, method, params, client_id, bufnr, config)
|
return fn(err, method, params, client_id, bufnr, config)
|
||||||
|
|||||||
Reference in New Issue
Block a user