Skip to content

Include generic plugin configuration #361

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

Merged
merged 8 commits into from
Mar 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ out
node_modules
.vscode-test
.DS_Store
dist
dist
*.vsix
Binary file removed images/haskell-logo.png
Binary file not shown.
Binary file added images/hls-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

127 changes: 117 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "haskell",
"displayName": "Haskell",
"description": "Haskell language support powered by the Haskell Language Server and ghcide",
"version": "1.2.0",
"version": "1.3.0",
"license": "MIT",
"publisher": "haskell",
"engines": {
Expand Down Expand Up @@ -30,7 +30,7 @@
"Linters",
"Other"
],
"icon": "images/haskell-logo.png",
"icon": "images/hls-logo.png",
"galleryBanner": {
"color": "#22172A",
"theme": "dark"
Expand Down Expand Up @@ -69,6 +69,7 @@
"properties": {
"haskell.hlintOn": {
"title": "Hlint",
"markdownDeprecationMessage": "**Deprecated**: Please use `#haskell.plugin.hlint.globalOn#` instead.",
"scope": "resource",
"type": "boolean",
"default": true,
Expand All @@ -86,12 +87,6 @@
"default": true,
"description": "Compute diagnostics continuously as you type. Turn off to only generate diagnostics on file save."
},
"haskell.liquidOn": {
"scope": "resource",
"type": "boolean",
"default": false,
"description": "Get diagnostics from liquid haskell"
},
"haskell.completionSnippetsOn": {
"title": "Completion Snippets",
"scope": "resource",
Expand All @@ -117,7 +112,7 @@
"none"
],
"default": "ormolu",
"description": "The formatter to use when formatting a document or range"
"description": "The formatter to use when formatting a document or range. Ensure the plugin is enabled."
},
"haskell.trace.server": {
"scope": "resource",
Expand All @@ -139,7 +134,6 @@
"scope": "resource",
"type": "string",
"enum": [
"haskell-ide-engine",
"haskell-language-server",
"ghcide"
],
Expand Down Expand Up @@ -173,6 +167,119 @@
],
"default": "keep-up-to-date",
"markdownDescription": "Only applicable with `#haskell.languageServerVariant#` set to `haskell-language-server`. Determine what to do when a new version of the language server is available."
},
"haskell.plugin.importLens.codeActionsOn": {
"scope": "resource",
"type": "boolean",
"default": true,
"description": "Enables explicit imports code actions"
},
"haskell.plugin.importLens.codeLensOn": {
"scope": "resource",
"type": "boolean",
"default": true,
"description": "Enables explicit imports code lenses"
},
"haskell.plugin.hlint.codeActionsOn": {
"scope": "resource",
"type": "boolean",
"default": true,
"description": "Enables hlint code actions (apply hints)"
},
"haskell.plugin.hlint.diagnosticsOn": {
"scope": "resource",
"type": "boolean",
"default": true,
"description": "Enables hlint diagnostics"
},
"haskell.plugin.eval.globalOn": {
"scope": "resource",
"type": "boolean",
"default": true,
"description": "Enables eval plugin"
},
"haskell.plugin.moduleName.globalOn": {
"scope": "resource",
"type": "boolean",
"default": true,
"description": "Enables module name plugin"
},
"haskell.plugin.splice.globalOn": {
"scope": "resource",
"type": "boolean",
"default": true,
"description": "Enables splice plugin (expand template haskell definitions)"
},
"haskell.plugin.haddockComments.globalOn": {
"scope": "resource",
"type": "boolean",
"default": true,
"description": "Enables haddock comments plugin"
},
"haskell.plugin.class.globalOn": {
"scope": "resource",
"type": "boolean",
"default": true,
"description": "Enables type class plugin"
},
"haskell.plugin.retrie.globalOn": {
"scope": "resource",
"type": "boolean",
"default": true,
"description": "Enables retrie plugin"
},
"haskell.plugin.tactic.globalOn": {
"scope": "resource",
"type": "boolean",
"default": true,
"description": "Enables wingman (tactic) plugin"
},
"haskell.plugin.tactic.config.max_use_ctor_actions": {
"title": "Max number of constructors",
"scope": "resource",
"type": "boolean",
"default": true,
"markdownDescription": "Maximum number of `Use constructor <x>` code actions that can appear"
},
Comment on lines +237 to +243
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

ugh, you are right, thanks for catching it, will fix it

Copy link
Collaborator

Choose a reason for hiding this comment

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

And features should be a string, instead of an object

Copy link
Member Author

Choose a reason for hiding this comment

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

mm I use that one on purpose, to force vscode editor show a button where you can write arbitrary json (including strings I hope)

Copy link
Collaborator

Choose a reason for hiding this comment

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

But the server accepts only strings. Why don't we use a textbox?

Copy link
Member Author

@jneira jneira Mar 17, 2021

Choose a reason for hiding this comment

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

tbh i do not get fully that config option, but it seems an advanced one, even obfuscated and it seems to me that it could be an array, no?
but if types say is a String, it is 🙂

Copy link
Collaborator

Choose a reason for hiding this comment

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

It's a magic string that enables extra features of wingman: haskell/haskell-language-server#1398 (though it can be obtained easily somehow :P)

Copy link
Member Author

Choose a reason for hiding this comment

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

ok will change, if the config option gets another type, we can change here at that time

"haskell.plugin.tactic.config.features": {
"scope": "resource",
"type": "Object",
"default": true,
"markdownDescription": "Features set used by wingman (tactic) plugin"
},
"haskell.plugin.pragmas.codeActionsOn": {
"scope": "resource",
"type": "boolean",
"default": true,
"description": "Enables pragmas code actions"
},
"haskell.plugin.pragmas.completionOn": {
"scope": "resource",
"type": "boolean",
"default": true,
"description": "Enables pragmas completions"
},
"haskell.plugin.ghcide-type-lenses.globalOn": {
"scope": "resource",
"type": "boolean",
"default": true,
"description": "Enables type lenses plugin"
},
"haskell.plugin.ghcide-type-lenses.config.mode": {
"scope": "resource",
"type": "string",
"default": true,
"description": "Control how type lenses are shown",
"enum": [
"always",
"exported",
"diagnostics"
],
"enumDescriptions": [
"Always displays type lenses of global bindings",
"Only display type lenses of exported global bindings",
"Follows error messages produced by GHC about missing signatures"
]
}
}
},
Expand Down