`override_vim_notify = true` -> notification captures cursor on `:q`
Discussed in https://github.com/j-hui/fidget.nvim/discussions/218
[!NOTE] GitHub Discussions are now disabled for this project, so the above link will 404, but the relevant discussion with @mrcjkb is reproduced below.
Originally posted by mrcjkb March 4, 2024 Hey :wave:
I really like fidget's override_vim_notify feature, as it usually doesn't get in my way, but I can look up notifications when I need them.
I've just been having one issue:
Sometimes, when trying to exit with :q or :wq while fidget is displaying a notification, instead of quitting Neovim, the cursor will move to the notification window.
I can consistently reproduce this with neogit (having the disable_builtin_notifications option set to true - which disables Neogit's notifications and uses vim.notify instead)
It always happens when I
- Modify something
:Neogitccto commit- Type the commit message and
:wqto commit qto close the Neogit tab - meanwhile theCommitted!notification shows up in fidget.:wq-> cusor moves to the fidget notification floating window (if I hit<CR>before the notification window is closed).
Here's the weird part:
I cannot reproduce the behaviour if I manually trigger the notification that Neogit sends with
:lua vim.notify("Committed!", vim.log.levels.INFO, { title = "Neogit", icon = "ó°Š¢" })
As I've only observed this behaviour with neogit notifications, I decided to put this in the Q&A. It's probably not a fidget.nvim bug...
Ah interesting, do you also get this error message?
"somefile" 3L, 11B written
E37: No write since last change
E162: No write since last change for buffer "[No Name]"
Press ENTER or type command to continue
I'm able to reproduce this issue, though am a little puzzled about what the cause might be. In particular, I'm not sure which buffer it is that was modified but has unsaved changes (the buffer for the Git-tracked somefile is clean).
Yes, I think I was seeing similar error messages.
Yep, I can confirm I am getting the same error message. It's quite consistent with neogit, but I haven't observed it anywhere else.
Sorry for the outside topic but, Is it possible to config Fidget to be able to show all of these priting messages ?
@Sirikakire I'm not aware of how to do so, but you should file a new issue for unrelated questions like these. I also advise you to look into noice.nvim, I believe it advertises some features like what you are looking for.
Sorry for the outside topic but, Is it possible to config Fidget to be able to show all of these priting messages ?
That requires a deeper integration with nvim_ui_attach like noice.nvim does it. That also includes replacing the cmd line etc. I think it's out of scope for fidget itself, but someone could make a shim or adapter as a separate plugin, which allows rerouting of ext_messages to any other backend
Note to self: this might be fixed by #279, but I need to double-check...