-
-
Notifications
You must be signed in to change notification settings - Fork 242
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(nvim-lint): make autocmd events configurable #1245
Conversation
Review ChecklistDoes this PR follow the [Contribution Guidelines](development guidelines)? Following is a partial checklist: Proper conventional commit scoping:
|
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.
opts.events doesnt seem to be a valid field for the options that should be passed to this plugin. Not sure if we should add it, so I defer to another maintainer. But this would open the floodgates in terms scope for astrocommunity.
Also, the current plugin spec should be updated to use astrocore.
Yeah we should avoid trying to modify the |
Ah, I see why this is being done the way it is. Let me see if there is a good way to set this up without being annoying. Main thing is we really want to stay away from modifying the |
Took a stab at this, still testing so not ready for merge |
Okay, tested and it looks good to go! Here is how the user would configure the autocommand events: return {
"AstroNvim/astrocore",
opts = function(_, opts)
-- customize the autocommand events for nvim-lint
opts.autocmds.auto_lint[1].event = { "BufWritePost" }
end
} |
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.
Thanks for this! It is a great idea to make this configurable
📑 Description
make
nvim-lint
autocmd events("BufWritePost", "BufReadPost", "InsertLeave", "TextChanged"
now) can be configured fromopts.events
ℹ Additional Information