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

Improve vscode extension schema generation #1742

Merged
merged 2 commits into from Apr 19, 2021

Conversation

berberman
Copy link
Collaborator

As discussed in haskell/vscode-haskell#378 (comment), in order to make the generated vscode extension schema more handy, this PR introduces a new data type taking place of the old pluginCustomConfig in PluginDescriptor:

data ConfigDescriptor = ConfigDescriptor {
  configEnableGenericConfig :: Bool,
  configHasDiagnostics      :: Bool,
  configCustomConfig        :: CustomConfig
}
  • We shouold set configHasDiagnostics to True explicitly in plugin like hlint, so that we could generate diagnosticsOn option for it.
  • Plugin will have single globalOn option only if it has one capability; otherwise we use specific capabilities such as codeActionOn, codeLensOn, etc. as options.
  • Normally, we won't hope disable capabilities of ghcide-hover-and-symbols plugin. So we set configEnableGenericConfig to False to avoid generating options of this plugin.

@jneira jneira changed the title Imporve vscode extension schema generation Improve vscode extension schema generation Apr 19, 2021
Copy link
Member

@jneira jneira left a comment

Choose a reason for hiding this comment

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

Thanks for this changes, i agree they are sensible, only i am little bit worried that are things we have to (and remember to!) set manually (like we have to use properties). But i guess it is not other way to encode the needed info.

@jneira jneira added the merge me Label to trigger pull request merge label Apr 19, 2021
@mergify mergify bot merged commit 98ffe94 into haskell:master Apr 19, 2021
@berberman berberman deleted the config-schema branch April 19, 2021 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge me Label to trigger pull request merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants