Skip to content

Commit 4175bd9

Browse files
committed
fix(toggles): add missing silent parameter
1 parent 582614a commit 4175bd9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lua/astrolsp/toggles.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ local function ui_notify(silent, ...) return not silent and vim.notify(...) end
1717
local function bool2str(bool) return bool and "on" or "off" end
1818

1919
--- Toggle auto format
20-
function M.autoformat()
20+
---@param silent? boolean if true then don't sent a notification
21+
function M.autoformat(silent)
2122
features.autoformat = not features.autoformat
22-
vim.notify(string.format("Global autoformatting %s", bool2str(features.autoformat)))
23+
ui_notify(silent, string.format("Global autoformatting %s", bool2str(features.autoformat)))
2324
end
2425

2526
--- Toggle buffer local auto format

0 commit comments

Comments
 (0)