feat(lsp): remove fidget in favor of displaying progress in cmdline
This commit is contained in:
@@ -41,7 +41,6 @@ require("pack").setup({
|
|||||||
"https://github.com/owallb/mason-auto-install.nvim",
|
"https://github.com/owallb/mason-auto-install.nvim",
|
||||||
"https://github.com/mfussenegger/nvim-dap",
|
"https://github.com/mfussenegger/nvim-dap",
|
||||||
"https://github.com/numToStr/Comment.nvim",
|
"https://github.com/numToStr/Comment.nvim",
|
||||||
"https://github.com/j-hui/fidget.nvim",
|
|
||||||
"https://github.com/rbong/vim-flog",
|
"https://github.com/rbong/vim-flog",
|
||||||
"https://github.com/tpope/vim-fugitive",
|
"https://github.com/tpope/vim-fugitive",
|
||||||
"https://github.com/lewis6991/gitsigns.nvim",
|
"https://github.com/lewis6991/gitsigns.nvim",
|
||||||
|
|||||||
+16
-1
@@ -39,11 +39,26 @@ local function with_file(path, settings)
|
|||||||
return vim.tbl_deep_extend("force", settings or {}, resp)
|
return vim.tbl_deep_extend("force", settings or {}, resp)
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.on_attach(client, _)
|
function M.on_attach(client, buf)
|
||||||
client.settings = with_file(
|
client.settings = with_file(
|
||||||
string.format(".%s.json", client.name),
|
string.format(".%s.json", client.name),
|
||||||
client.settings
|
client.settings
|
||||||
) or 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
|
end
|
||||||
|
|
||||||
function M.setup()
|
function M.setup()
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
require("fidget").setup({})
|
|
||||||
@@ -9,10 +9,6 @@
|
|||||||
"src": "https://github.com/saghen/blink.cmp",
|
"src": "https://github.com/saghen/blink.cmp",
|
||||||
"version": "1.0.0 - 2.0.0"
|
"version": "1.0.0 - 2.0.0"
|
||||||
},
|
},
|
||||||
"fidget.nvim": {
|
|
||||||
"rev": "889e2e96edef4e144965571d46f7a77bcc4d0ddf",
|
|
||||||
"src": "https://github.com/j-hui/fidget.nvim"
|
|
||||||
},
|
|
||||||
"gitsigns.nvim": {
|
"gitsigns.nvim": {
|
||||||
"rev": "0d797daee85366bc242580e352a4f62d67557b84",
|
"rev": "0d797daee85366bc242580e352a4f62d67557b84",
|
||||||
"src": "https://github.com/lewis6991/gitsigns.nvim"
|
"src": "https://github.com/lewis6991/gitsigns.nvim"
|
||||||
|
|||||||
Reference in New Issue
Block a user