package-info.nvim icon indicating copy to clipboard operation
package-info.nvim copied to clipboard

Feat: Add nvim-notify support

Open agoodshort opened this issue 2 years ago • 2 comments

As the title says, this adds support for nvim-notify.

The idea so far is to check if nvim-notify is installed, and if it is, we use vim.notify() to display the loading status.

I'm not sure how most people use nvim-notify and if they hook vim.notify = require("notify") as described in the README. I personally use it through noice and this implementation works as expected. Maybe someone from #131 can shime in.

Next steps/questions:

  • Update docs?
  • Should it be configurable?

recording_20231005-234247.webm

(Kinda cool I received an error message during my recording :smiling_face_with_tear:)


Credit to this snippet which helped a lot to understand how to replace an existing notification


Closes #131

agoodshort avatar Oct 05 '23 22:10 agoodshort

Looks good. Thanks for implementing it.

As for the configurability, maybe see it people want it and add it then, not sure. Up to you :D


As for the error, I saw it happens and not sure why. I don't use the plugin myself that much so I haven't prioritized fixing it. If you are up for it, I'd be glad to help.


As for the docs, maybe add a note somewhere that notify is supported and put this video. I think that would work. Maybe without the error :D

vuki656 avatar Oct 06 '23 14:10 vuki656

I am gone on holidays, will be back on a PC towards the end of October. I will then work on the points above. Hope we get some feedback from people by then.

agoodshort avatar Oct 12 '23 01:10 agoodshort

Hey @agoodshort, any plans to finish this?

vuki656 avatar Jul 29 '24 08:07 vuki656

Abandoned. If anyone wants to continue, free free. I'll review a PR.

vuki656 avatar Aug 06 '24 11:08 vuki656

Hey @vuki656, I'm so sorry I totally forgot about this PR...

I reviewed the work done and fixed a few things, I created a new branch for now. If you're okay to reopen this PR, I will just force push my changes to my original branch agoodshort:nvim-notify

Regarding the comments above:

  • I won't make it configurable. If nvim-notify is installed, user will get the pop-ups (I think that's what most people would want... We didn't really get any feedback on the open issue)
  • The error message in the video above was a good example scenario to catch an installation failure. It helped me fix the pop-up style (warning => orange / error => red).

I think all I am missing is to add a note on the README and create a small gif to illustrate

agoodshort avatar Aug 06 '24 23:08 agoodshort

Hey. Sure, i'll reopen it.

Regarding README, you can add the things you proposed

vuki656 avatar Aug 07 '24 08:08 vuki656