Skip to content

Commit 0e6a62a

Browse files
committed
fix(keymaps): change stderr notification level from ERROR to INFO in lazy_cmd_with_fidget
Previously, stderr output was notified at the ERROR level, which could be too aggressive for some use cases. This change downgrades the notification level to INFO for better user experience.
1 parent 803de03 commit 0e6a62a

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

lua/dcai/keymaps/utils.lua

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ M.lazy_cmd = function(command, args, opts)
3030
args = args,
3131
cwd = cwd,
3232
on_exit = vim.schedule_wrap(function(job, ret)
33-
local stderr = normalize_line_endings(table.concat(job:stderr_result(), vim.g.nl))
34-
local stdout = normalize_line_endings(table.concat(job:result(), vim.g.nl))
33+
local stderr =
34+
normalize_line_endings(table.concat(job:stderr_result(), vim.g.nl))
35+
local stdout =
36+
normalize_line_endings(table.concat(job:result(), vim.g.nl))
3537

3638
if ret == 0 then
3739
if opts.on_success then
@@ -108,7 +110,8 @@ M.lazy_cmd_with_fidget = function(command, args, opts)
108110
vim.notify(stdout, vim.log.levels.INFO)
109111
end
110112
if stderr ~= '' then
111-
vim.notify(stderr, vim.log.levels.ERROR)
113+
-- vim.notify(stderr, vim.log.levels.ERROR)
114+
vim.notify(stderr, vim.log.levels.INFO)
112115
end
113116
handle:finish()
114117
end,

0 commit comments

Comments
 (0)