Skip to content

Commit 36d60dd

Browse files
phanenibhagwan
authored andcommitted
fix(lsp): change error to warn on lsp error message (#2547)
see #2547 (comment) Builtin lsp warn on hierarchy request: https://github.com/neovim/neovim/blob/0501c5fd0959895b18d8166c6c034cdf1832edf3/runtime/lua/vim/lsp/buf.lua#L1275 Also other "content" request don't throw error message. So I think we can change error to warn.
1 parent e5804f4 commit 36d60dd

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lua/fzf-lua/providers/lsp.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,8 @@ local function gen_lsp_contents(opts)
485485
local context = { client_id = client_id }
486486
lsp_handler.handler(opts, cb, lsp_handler.method, response.result, context, nil)
487487
elseif response.error then
488-
utils.error("Error executing '%s': %s", lsp_handler.method, response.error.message)
488+
local name = assert(vim.lsp.get_client_by_id(client_id)).name
489+
utils.warn("%s[%s]: %s", tostring(name), lsp_handler.method, response.error.message)
489490
end
490491
end
491492
if utils.tbl_isempty(results) then

0 commit comments

Comments
 (0)