diff options
Diffstat (limited to 'runtime/lua/vim/lsp/handlers.lua')
-rw-r--r-- | runtime/lua/vim/lsp/handlers.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/runtime/lua/vim/lsp/handlers.lua b/runtime/lua/vim/lsp/handlers.lua index 7eac3febd9..0cf80e1443 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 @@ -26,7 +26,7 @@ end -- @msg of type ProgressParams -- Basically a token of type number/string -local function progress_callback(_, _, params, client_id) +local function progress_handler(_, _, params, client_id) local client = vim.lsp.get_client_by_id(client_id) local client_name = client and client.name or string.format("id=%d", client_id) if not client then @@ -62,7 +62,7 @@ local function progress_callback(_, _, params, client_id) end --@see https://microsoft.github.io/language-server-protocol/specifications/specification-current/#progress -M['$/progress'] = progress_callback +M['$/progress'] = progress_handler --@see https://microsoft.github.io/language-server-protocol/specifications/specification-current/#window_workDoneProgress_create M['window/workDoneProgress/create'] = function(_, _, params, client_id) @@ -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) |