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

Propagate all errors via Result and use vim.notify in lua for logging #16

Open
dasupradyumna opened this issue Dec 31, 2024 · 1 comment
Assignees
Labels
internal Related to internal project development
Milestone

Comments

@dasupradyumna
Copy link
Owner

Context

All notifications published by the plugin are handled using the internal utils::notify module. This module dispatches the notification to the builtin neovim API nvim_notify() function, which works as expected. But in the future, the plugin should support notification decorator plugins such as nvim-notify, which overload the builtin vim.notify() function. This behavior will not be supported by the current notification module.

Proposal

Implement a separate notification module in lua, using vim.notify() function. This would require the API functions return a notification message along with the level. This can be achieved by propagating all errors using Result objects internally, and handling them at the top-level.

@dasupradyumna dasupradyumna self-assigned this Dec 31, 2024
@dasupradyumna dasupradyumna added the internal Related to internal project development label Dec 31, 2024
@dasupradyumna dasupradyumna added this to the v1.0.0 milestone Dec 31, 2024
@dasupradyumna
Copy link
Owner Author

Blocked by #18.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal Related to internal project development
Projects
None yet
Development

No branches or pull requests

1 participant