The below code shows a notification that never disappears and only removes it on success.
What I am experiencing is that package-info is failing to determine that the operation succeeded and never removes the notification, which is really annoying because I have to manually dismiss all notifications all the time. Would have been nice if it was using a disappearing notification variant.
I'd have opened a PR myself but my Lua is a bit "rusty" (actually it's crap, and I don't know the NVIM APIs, sort of a novice user...).
|
job({ |
|
json = true, |
|
command = "npm outdated --json", |
|
ignore_error = true, |
|
on_start = function() |
|
loading.start(id) |
|
end, |
|
on_success = function(outdated_dependencies) |
|
state.dependencies.outdated = outdated_dependencies |
|
|
|
if vim.api.nvim_buf_is_valid(state.buffer.id) and vim.api.nvim_buf_is_loaded(state.buffer.id) then |
|
parser.parse_buffer() |
|
virtual_text.display() |
|
reload() |
|
end |
|
|
|
loading.stop(id, loading_message) |
|
|
|
state.last_run.update() |
|
end, |
|
on_error = function() |
|
loading.stop(id, loading_message, vim.log.levels.ERROR) |
|
end, |
|
}) |
Could you add an option to disable notifications as a simple solution to this?
-- Disabling because it shows a never disappearing notification.
---@type LazyPluginSpec
return {
"vuki656/package-info.nvim",
opts = {
hide_unstable_versions = true,
package_manager = "pnpm",
-- hide_notifications = true, -- <-- add support for
},
}
The below code shows a notification that never disappears and only removes it on success.
What I am experiencing is that package-info is failing to determine that the operation succeeded and never removes the notification, which is really annoying because I have to manually dismiss all notifications all the time. Would have been nice if it was using a disappearing notification variant.
I'd have opened a PR myself but my Lua is a bit "rusty" (actually it's crap, and I don't know the NVIM APIs, sort of a novice user...).
package-info.nvim/lua/package-info/actions/show.lua
Lines 32 to 55 in 3de4f35
Could you add an option to disable notifications as a simple solution to this?