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

API to set priorities of individual PluginHandlers #3644

Open
mrcjkb opened this issue Jun 11, 2023 · 2 comments
Open

API to set priorities of individual PluginHandlers #3644

mrcjkb opened this issue Jun 11, 2023 · 2 comments
Labels
type: enhancement New feature or request

Comments

@mrcjkb
Copy link
Contributor

mrcjkb commented Jun 11, 2023

Is your enhancement request related to a problem? Please describe.

To solve #3636, I had to split the hls-pragmas-plugin into three separate plugins (see #3640),
so that I could decrease the priority of the "disable this warning" codeAction.

A cleaner solution would be to have a single plugin with priorities set for the individual PluginHandlers.

Describe the solution you'd like

  • A property for each pluginHandler (analogous to the PluginDescriptor.pluginPriority property) that lets us define the priority of each pluginHandler.
  • This priority should be used to sort the code actions and completions.
@michaelpj
Copy link
Collaborator

Or we could go even further, and return some type from a plugin handler other than the bare LSP response type, and then we could put the priorities into the result type for things that look like "a list of results".

@michaelpj
Copy link
Collaborator

Unclear whether this would necessarily be an improvement. At the moment the plugin is our "unit of configurability", and maybe we should just live with that as a coherent design.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants