Skip to content
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

Add option to disable notifications #778

Closed
1 task done
dm9pZCAq opened this issue Mar 14, 2023 · 1 comment
Closed
1 task done

Add option to disable notifications #778

dm9pZCAq opened this issue Mar 14, 2023 · 1 comment
Labels
feature Issues related to feature proposals. Please attach a module.

Comments

@dm9pZCAq
Copy link

dm9pZCAq commented Mar 14, 2023

Issues

  • I have checked existing issues and there are no existing ones with the same request.

Feature description

Currently when I do :Neor workspace something it notifies me without any conditions.

if event.type == "core.neorgcmd.events.dirman.workspace" then
-- Have we supplied an argument?
if event.content[1] then
module.public.open_workspace(event.content[1])
vim.schedule(function()
local new_workspace = module.public.get_workspace(event.content[1])
if not new_workspace then
return
end
vim.notify("New Workspace: " .. event.content[1] .. " -> " .. new_workspace)
end)
else -- No argument supplied, simply print the current workspace
-- Query the current workspace
local current_ws = module.public.get_current_workspace()
-- Nicely print it. We schedule_wrap here because people with a configured logger will have this message
-- silenced by other trace logs
vim.schedule(function()
vim.notify("Current Workspace: " .. current_ws[1] .. " -> " .. current_ws[2])
end)
end
end

I would like to somehow disable this and possibly other vim.notify

Help

Yes, but I don't know how to start. I would need guidance

Implementation help

No response

@dm9pZCAq dm9pZCAq added the feature Issues related to feature proposals. Please attach a module. label Mar 14, 2023
@danymat
Copy link
Member

danymat commented Mar 31, 2023

Hello,

I suggest installing nvim-notify, that provides a wrapper around the default notify function, with fancy UI. They have an option here allowing you to only show levels above a certain log level.

If more people want a neorg native notification handler, I will consider adding it. Nevertheless, I will update the log level for error notifications.

Please reopen the issue if this don't suffice you :)
regards !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Issues related to feature proposals. Please attach a module.
Projects
None yet
Development

No branches or pull requests

2 participants