-
Notifications
You must be signed in to change notification settings - Fork 274
Description
Did you check existing requests?
- I have searched the existing issues
Describe the feature
Hello 👋🏼
I would like to add an optional mason attribute to the formatters' definition when the Mason registry entry is not the name of the formatter.
Provide background
I made a plugin, https://github.com/noirbizarre/ensure.nvim, to automatically install dependencies using Mason and I realized that I need to maintain a mapping between conform.nvim formatter names and Mason's.
When I checked a bit how it was done by similar plugins, they are doing the same.
The problems with this approach:
- n separate initiatives leading to n separate maintenance efforts
- each plugin will only have new mapping based on each userbase usage
- onboarding new users using a new formatter requiring a mapping leads to failure on first usage
Having it directly into conform.nvim formatters registry would benefit all those plugins while being very low maintenance (no extra code logic in conform.nvim)
What is the significance of this feature?
nice to have
Additional details
I'm willing to contribute this if you are OK with it.
Note
There is 2 possibles approaches in my option:
- have a
masonattribute only when name is different - have a
masonattribute as soon as a package is present in Mason registry
Approach 2. has the benefit of bringing an additional info: "this formatter is present in Mason registery" in addition to "here's its name in Mason registry", but it means more mason attributes to maintain.
If you are OK with the contribution, I would take the approach you prefer.