aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/nvim
diff options
context:
space:
mode:
authorToby Vincent <tobyv13@gmail.com>2022-12-30 17:41:28 -0600
committerToby Vincent <tobyv13@gmail.com>2022-12-30 17:41:28 -0600
commit583b6a321ee807e5ac76933b8e096637f44e55a1 (patch)
tree5524ece0101db5ebaecd8f837e496359a5bfad6e /nvim
parentdeb973e90f20302e3d166675b05e0e5a22df9a72 (diff)
feat(nvim): move lsp progress into noice from fidget
Diffstat (limited to 'nvim')
-rw-r--r--nvim/.config/nvim/lua/tobyvin/lazy.lua1
-rw-r--r--nvim/.config/nvim/lua/tobyvin/plugins/fidget.lua19
-rw-r--r--nvim/.config/nvim/lua/tobyvin/plugins/noice.lua37
-rw-r--r--nvim/.config/nvim/lua/tobyvin/utils/status.lua2
4 files changed, 37 insertions, 22 deletions
diff --git a/nvim/.config/nvim/lua/tobyvin/lazy.lua b/nvim/.config/nvim/lua/tobyvin/lazy.lua
index cdb4dcb..7c97224 100644
--- a/nvim/.config/nvim/lua/tobyvin/lazy.lua
+++ b/nvim/.config/nvim/lua/tobyvin/lazy.lua
@@ -26,6 +26,7 @@ require("lazy").setup("tobyvin.plugins", {
},
checker = {
enabled = true,
+ notify = false,
},
ui = {
border = "single",
diff --git a/nvim/.config/nvim/lua/tobyvin/plugins/fidget.lua b/nvim/.config/nvim/lua/tobyvin/plugins/fidget.lua
deleted file mode 100644
index 079f676..0000000
--- a/nvim/.config/nvim/lua/tobyvin/plugins/fidget.lua
+++ /dev/null
@@ -1,19 +0,0 @@
-local M = {
- "j-hui/fidget.nvim",
- event = "LspAttach",
-}
-
-function M.config()
- local fidget = require("fidget")
- local utils = require("tobyvin.utils")
-
- fidget.setup({
- text = {
- spinner = utils.status.signs.spinner.text,
- done = vim.trim(utils.status.signs.completed.text),
- },
- window = { blend = 0 },
- })
-end
-
-return M
diff --git a/nvim/.config/nvim/lua/tobyvin/plugins/noice.lua b/nvim/.config/nvim/lua/tobyvin/plugins/noice.lua
index 5fbf16b..500de0f 100644
--- a/nvim/.config/nvim/lua/tobyvin/plugins/noice.lua
+++ b/nvim/.config/nvim/lua/tobyvin/plugins/noice.lua
@@ -20,7 +20,24 @@ local M = {
["vim.lsp.util.stylize_markdown"] = true,
["cmp.entry.get_documentation"] = true,
},
- progress = { enabled = false },
+ progress = {
+ enabled = true,
+ format = {
+ { "{data.progress.message} " },
+ "({data.progress.percentage}%) ",
+ { "{spinner} ", hl_group = "NoiceLspProgressSpinner" },
+ { "{data.progress.title} ", hl_group = "NoiceLspProgressTitle" },
+ { "{data.progress.client} ", hl_group = "NoiceLspProgressClient" },
+ },
+ format_done = {
+ {
+ require("tobyvin.utils.status").signs.done.text,
+ hl_group = "NoiceLspProgressDone",
+ },
+ { "{data.progress.title} ", hl_group = "NoiceLspProgressTitle" },
+ { "{data.progress.client} ", hl_group = "NoiceLspProgressClient" },
+ },
+ },
messages = { enabled = false },
},
commands = {
@@ -32,12 +49,12 @@ local M = {
},
routes = {
{
+ view = "notify_send",
filter = {
cond = function()
return not focused
end,
},
- view = "notify_send",
opts = { stop = false },
},
},
@@ -48,11 +65,27 @@ local M = {
},
position = { row = 2, col = 2 },
},
+ mini = {
+ position = {
+ row = -2,
+ },
+ win_options = {
+ winblend = 0,
+ },
+ },
},
},
}
function M.init()
+ vim.api.nvim_set_hl(0, "NoiceLspProgressSpinner", {
+ link = require("tobyvin.utils.status").signs.spinner.texthl,
+ })
+
+ vim.api.nvim_set_hl(0, "NoiceLspProgressDone", {
+ link = require("tobyvin.utils.status").signs.done.texthl,
+ })
+
vim.api.nvim_create_autocmd("FocusGained", {
callback = function()
focused = true
diff --git a/nvim/.config/nvim/lua/tobyvin/utils/status.lua b/nvim/.config/nvim/lua/tobyvin/utils/status.lua
index 173a005..20d38fa 100644
--- a/nvim/.config/nvim/lua/tobyvin/utils/status.lua
+++ b/nvim/.config/nvim/lua/tobyvin/utils/status.lua
@@ -4,7 +4,7 @@ M.signs = {
started = { text = "ﳁ ", texthl = "diffChanged" },
running = { text = "ﳁ ", texthl = "DiagnosticSignInfo" },
failed = { text = " ", texthl = "DiagnosticSignError" },
- completed = { text = " ", texthl = "diffAdded" },
+ done = { text = " ", texthl = "diffAdded" },
spinner = { text = { "⣷", "⣯", "⣟", "⡿", "⢿", "⣻", "⣽", "⣾" }, texthl = "DiagnosticSignInfo" },
}