Skip to content

Commit

Permalink
Also handle old handler if set
Browse files Browse the repository at this point in the history
  • Loading branch information
deathbeam committed Feb 18, 2024
1 parent 783e642 commit cddcf2a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lua/lspecho/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,13 @@ local function lsp_progress(err, progress, ctx)
end

function M.setup()
vim.lsp.handlers['$/progress'] = lsp_progress
local old_handler = vim.lsp.handlers["$/progress"]
vim.lsp.handlers['$/progress'] = function(...)
if old_handler then
old_handler(...)
end
lsp_progress(...)
end
end

return M

0 comments on commit cddcf2a

Please sign in to comment.