From 6cffc2090ed6e3966e189e695160914a33a4f23f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=B7=E9=85=94=E9=96=91=E5=90=9F?= <50296129+Jint-lzxy@users.noreply.github.com> Date: Sun, 19 Nov 2023 14:08:45 +0800 Subject: [PATCH] feat(fidget)!: support v2 (#1068) * feat(fidget)!: support v2 * fixup! feat(fidget)!: support v2 --- lua/modules/configs/ui/fidget.lua | 24 +++++++++++++++++++----- lua/modules/plugins/ui.lua | 1 - 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/lua/modules/configs/ui/fidget.lua b/lua/modules/configs/ui/fidget.lua index e2ef87a61..ee920a3f6 100644 --- a/lua/modules/configs/ui/fidget.lua +++ b/lua/modules/configs/ui/fidget.lua @@ -1,11 +1,25 @@ return function() + local icons = { + ui = require("modules.utils.icons").get("ui"), + } + require("modules.utils").load_plugin("fidget", { - window = { blend = 0 }, - sources = { - ["null-ls"] = { ignore = true }, + progress = { + suppress_on_insert = false, -- Suppress new messages while in insert mode + ignore_done_already = false, -- Ignore new tasks that are already complete + ignore = { "null-ls" }, -- List of LSP servers to ignore + display = { + render_limit = 5, -- How many LSP messages to show at once + done_ttl = 2, -- How long a message should persist after completion + done_icon = icons.ui.Accepted, -- Icon shown when all LSP progress tasks are complete + }, }, - fmt = { - max_messages = 3, -- The maximum number of messages stacked at any give time + notification = { + override_vim_notify = false, -- Automatically override vim.notify() with Fidget + window = { + winblend = 0, -- Background color opacity in the notification window + zindex = 75, -- Stacking priority of the notification window + }, }, }) end diff --git a/lua/modules/plugins/ui.lua b/lua/modules/plugins/ui.lua index c7aa694f0..e3c50fae9 100644 --- a/lua/modules/plugins/ui.lua +++ b/lua/modules/plugins/ui.lua @@ -18,7 +18,6 @@ ui["Jint-lzxy/nvim"] = { } ui["j-hui/fidget.nvim"] = { lazy = true, - branch = "legacy", event = "LspAttach", config = require("ui.fidget"), }