Skip to content

fix(#1697): remove notify plugin auto-detection #2135

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

Merged

Conversation

ghostbuster91
Copy link
Contributor

@ghostbuster91 ghostbuster91 commented Apr 12, 2023

fixes #1697

This PR is a direct consequence of the discussion that took place in #2117

This addresses the issue #1697 because users can just customize their vim.notify handlers.

else
vim.notify(string.format("[NvimTree] %s", vim.inspect(msg)), level)
end
vim.notify(msg, level, { title = "NvimTree" })
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is obviously one downside of that meaning that by default opt table is unused so users won't know where that notification comes from unless they customize their vim.notify to prepend the title like it was done before.

Now, I am quite new in the vim ecosystem so it is hard for me to make a call whether that is ok, but as far as I know passing title within the opt table is kind of convention already.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as far as I know passing title within the opt table is kind of convention already.

It seems to be used by a few. We could safely add more info later, if a new consumer arrives.

Copy link
Member

@alex-courtis alex-courtis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a fantastic outcome.

Works nicely with rcarriga/nvim-notify vim.notify = require("notify")

else
vim.notify(string.format("[NvimTree] %s", vim.inspect(msg)), level)
end
vim.notify(msg, level, { title = "NvimTree" })
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as far as I know passing title within the opt table is kind of convention already.

It seems to be used by a few. We could safely add more info later, if a new consumer arrives.

@alex-courtis alex-courtis changed the title feat: Remove nvim-notify auto-detection fix(#1697): remove notify plugin auto-detection Apr 15, 2023
@alex-courtis alex-courtis merged commit 68f485b into nvim-tree:master Apr 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for other vim.notify wrappers
2 participants