Commit ec911a4
committed
Add a delay before printing usage message
Without this, the message is cleared before the UI is fully initialized.
This also allows us to use the default INFO log level. Previously, using
WARN level was required to make the message display. But now it seems
like even WARN level is not enough to keep the message displayed.
I'm not a fan of using those `time.sleep()`-type of "fixes". And it's
possible that using a 100ms delay is not appropriate for all set ups,
but just happens to work for me as of September 4 2025. But I don't have
time right now to find a proper fix, let alone investigate and bisect
when the behaviour changed in Neovim.
This can be replicated with:
$ nvim --clean --noplugin -c 'lua vim.notify("hello")'
versus
$ nvim --clean --noplugin -c 'lua vim.defer_fn(function() vim.notify("hello") end, 100)'
The first one doesn't have any message in the `:messages` section, while
the latter does (using Neovim v0.11.3).1 parent 82b4a87 commit ec911a4
1 file changed
+5
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
298 | | - | |
299 | | - | |
300 | | - | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
301 | 303 | | |
302 | 304 | | |
303 | 305 | | |
| |||
0 commit comments