Skip to content

feature request: an optional mason mapping attribute #836

@noirbizarre

Description

@noirbizarre

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:

  1. have a mason attribute only when name is different
  2. have a mason attribute 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions