Skip to content

Commit 6f9cddc

Browse files
committed
fix(keymaps/utils): improve fidget progress handle title and lsp_client name
Set the fidget progress handle title to the provided option or command, and use the full command string for the lsp_client name to provide clearer context during command execution.
1 parent e0f5e03 commit 6f9cddc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lua/dcai/keymaps/utils.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,14 @@ M.cmd_with_fidget = function(command, args, opts)
8383

8484
opts = opts or {}
8585
local cwd = opts.cwd or vim.fn.getcwd()
86-
local title = opts.title
87-
or string.format('%s %s', command, table.concat(args, ' '))
86+
local command_full =
87+
string.format('%s %s', command, table.concat(args, ' '))
8888

8989
-- Create fidget progress handle
9090
local handle = fidget_progress.handle.create({
91-
title = title,
91+
title = opts.title or command,
9292
message = 'Running...',
93-
lsp_client = { name = command },
93+
lsp_client = { name = command_full },
9494
})
9595

9696
Job:new({

0 commit comments

Comments
 (0)