feat(lsp): remove fidget in favor of displaying progress in cmdline
This commit is contained in:
+16
-1
@@ -39,11 +39,26 @@ local function with_file(path, settings)
|
||||
return vim.tbl_deep_extend("force", settings or {}, resp)
|
||||
end
|
||||
|
||||
function M.on_attach(client, _)
|
||||
function M.on_attach(client, buf)
|
||||
client.settings = with_file(
|
||||
string.format(".%s.json", client.name),
|
||||
client.settings
|
||||
) or client.settings
|
||||
|
||||
vim.api.nvim_create_autocmd("LspProgress", {
|
||||
buffer = buf,
|
||||
callback = function(ev)
|
||||
local value = ev.data.params.value
|
||||
vim.api.nvim_echo({ { value.message or "done" } }, false, {
|
||||
id = "lsp." .. ev.data.params.token,
|
||||
kind = "progress",
|
||||
source = "vim.lsp",
|
||||
title = value.title,
|
||||
status = value.kind ~= "end" and "running" or "success",
|
||||
percent = value.percentage,
|
||||
})
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
function M.setup()
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
require("fidget").setup({})
|
||||
Reference in New Issue
Block a user