Closed emmanueltouzery closed 1 month ago
I've been meaning to replace the old echo
commands for a while, but never got around to it. Thank you for taking the initiative!
I think your first suggested course of action is the best one: remove echo_multiln()
and call vim.notify()
from the other notification functions.
vim.notify()
accepts an optional table parameter, that is unused by the default handler, but many of the popular UI notification plugins at least respect the title
key in this table. So let's set that to "diffview.nvim"
.
Are you still interested in writing a PR for this?
Yes! Thank you for the feedback.
I'll open a pr soon based on your plan, or ask followup questions here 👍
Great, thank you! I'll go ahead and assign you to the issue.
I would be interested to write a PR for that, but I'm afraid that you'd reject it, so I would first ask if you'd agree with the approach.
It seems to me that in particular error messages (eg
utils.err()
in the source) are not that emphasized in the GUI. neovim introduced the vim.notify call that can be overridden by users for custom display. For instance the vim.notify plugin offers such an override: https://github.com/rcarriga/nvim-notifyI would like to enable the user to decide between the current display (using
nvim_echo
) or vim.notify, that would allow the user to customize the display.Possible options...
echo_multiln
user_messages_with_notify = false
user_message_displayed
. Although that's a bit redundant, because vim.notify already allows customization but...If you think such a feature has its place in diffview, feel free to let me know which approach you'd rather see, and I can prepare a PR to that effect!
Thank you for an amazing plugin!