Skip to content

Commit

Permalink
Don't emit any user-facing messages via vim.notify.
Browse files Browse the repository at this point in the history
For users not using nvim-notify (for whatever reason), the log level
isn't respected in the sense that no filtering is done by default, so
even debug messages will *synchronously* interrupt users from typing or
moving around Lean files.
  • Loading branch information
Julian committed Feb 5, 2025
1 parent 5cc20fc commit bf9bb85
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/lean/widgets.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

local Element = require('lean.tui').Element
local dedent = require('lean._util').dedent
local log = require 'lean.log'

---@alias WidgetRenderer fun(self: Widget, props: any, uri: string): Element[]?

Expand Down Expand Up @@ -44,7 +45,7 @@ function Widget.unsupported(id)
If you think it could be, please file an issue at
https://github.com/Julian/lean.nvim/issues/new/?title=%s
]]
vim.notify_once(msg:format(id, title), vim.log.levels.DEBUG)
log:debug { message = msg:format(id, title), id = id }
end,
}
end
Expand Down

0 comments on commit bf9bb85

Please sign in to comment.