-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: Add nvim-notify support #143
Conversation
26e88d3
to
0ca2f37
Compare
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 |
I am gone on holidays, will be back on a PC towards the end of October. I will then work on the points above. |
Hey @agoodshort, any plans to finish this? |
Abandoned. If anyone wants to continue, free free. I'll review a PR. |
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 Regarding the comments above:
I think all I am missing is to add a note on the README and create a small gif to illustrate |
Hey. Sure, i'll reopen it. Regarding README, you can add the things you proposed |
558aacf
to
a266064
Compare
feat: add nvim-notify support (vuki656#143)
instance.notification = vim.notify(message, vim.log.levels.INFO, { | ||
title = title, | ||
icon = SPINNERS[1], | ||
timeout = false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious whether this timeout is reasonable. Should there be an option to modify the notification timeout?
return {
"vuki656/package-info.nvim",
event = { "BufRead package.json" },
ft = "json",
config = function()
require("package-info").setup {
autostart = false,
package_manager = "pnpm",
}
vim.api.nvim_create_autocmd("FileType", {
pattern = "json",
callback = function()
-- wait 0.5 second
if vim.fn.expand "%:t" == "package.json" then
vim.defer_fn(function()
require("package-info").show()
end, 500)
end
end,
})
end,
} fix with timeout :) |
If this can be adjusted feel free to open a PR, happy to merge |
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:
recording_20231005-234247.webm
(Kinda cool I received an error message during my recording 🥲)
Credit to this snippet which helped a lot to understand how to replace an existing notification
Closes #131