haskell-nova/Haskell Language Server.novaextension/extension.json
2022-03-20 12:49:21 +03:00

342 lines
10 KiB
JSON

{
"identifier": "iko.soy.HaskellLanguageServer",
"name": "Haskell Language Server",
"organization": "iko",
"description": "Lorem ipsum, dolor sit amet.",
"version": "1.0",
"categories": ["languages", "formatters"],
"main": "main.js",
"entitlements":
{
"process": true,
"filesystem": "readwrite",
"requests": true
},
"configWorkspace": [
{
"key": "haskell-language-server-path",
"title": "Haskell Language Server path",
"description": "If you want to use a custom HLS build for this project, then specify the path to it here.",
"type": "path",
"placeholder": "/usr/local/bin/example"
},
{
"key": "env-generator",
"title": "Environment generator",
"description": "You can specify a shell command which will be used to generate the environment, in which the extension will be executes. This is useful if you want to utilize `nix-shell`, `direnv` or any similar command.\n\nExpects the command to have the same stdout as the `env` command.",
"type": "enum",
"allowsCustom": true,
"values": ["nix-shell --run env", "direnv exec env"]
},
{
"type": "section",
"title": "Haskell Language Server settings",
"description":"Some of the features are not supported in Nova. Some of them are explicitly marked as not supported, but it is not exhaustive.",
"children": [
{
"key": "haskell.formattingProvider",
"title": "Code formatter",
"type": "enum",
"values": [
"brittany",
"floskell",
"fourmolu",
"ormolu",
"stylish-haskell",
"none"
],
"default": "ormolu",
"description": "The formatter to use when formatting a document or range. Ensure the plugin is enabled."
},
{
"key": "haskell.checkProject",
"title": "Check whole project",
"type": "boolean",
"default": false,
"description": "Whether to typecheck the entire project on load. It could lead to bad perfomance in large projects."
},
{
"title": "Completions",
"type": "section",
"children": [
{
"key": "haskell.plugin.ghcide-completions.config.autoExtendOn",
"title": "Extend with out-of-scope identifiers",
"description": "Extends the import list automatically when completing a out-of-scope identifier",
"default": true,
"type": "boolean"
},
{
"key": "haskell.plugin.ghcide-completions.config.snippetsOn",
"title": "Insert snippets",
"description": "Inserts snippets when using code completions",
"default": true,
"type": "boolean"
},
{
"key": "haskell.maxCompletions",
"type": "number",
"title": "Maximum number of completions",
"description": "Maximum number of completions sent to the editor.",
"default": 40
}]
},
{
"title": "HLint",
"type": "section",
"children": [
{
"key": "haskell.plugin.hlint.codeActionsOn",
"title": "Enable code actions",
"type": "boolean",
"default": true,
"description": "Enables hlint code actions (apply hints)"
},
{
"key": "haskell.plugin.hlint.diagnosticsOn",
"title": "Enable diagnostics",
"type": "boolean",
"default": true,
"description": "Enables hlint diagnostics"
},
{
"key": "haskell.plugin.hlint.config.flags",
"title": "Flags",
"description": "Flags used by hlint",
"default": [],
"type": "stringArray"
}]
},
{
"type": "section",
"title": "Import lens",
"description": "Not currently implemented in Nova",
"children": [
{
"key": "haskell.plugin.importLens.codeActionsOn",
"title": "Enable code actions",
"type": "boolean",
"default": true,
"description": "Enables explicit imports code actions"
},
{
"key": "haskell.plugin.importLens.codeLensOn",
"title": "Enable code lens",
"type": "boolean",
"default": true,
"description": "Enables explicit imports code lenses"
}]
},
{
"title": "Eval",
"type": "section",
"children": [
{
"key": "haskell.plugin.eval.globalOn",
"title": "Enable",
"type": "boolean",
"default": true,
"description": "Enables eval plugin"
}]
},
{
"title": "Module name",
"type": "section",
"children": [
{
"key": "haskell.plugin.moduleName.globalOn",
"title": "Enable",
"type": "boolean",
"default": true,
"description": "Enables module name plugin"
}]
},
{
"title": "Splice",
"type": "section",
"children": [
{
"key": "haskell.plugin.splice.globalOn",
"title": "Enable",
"type": "boolean",
"default": true,
"description": "Enables splice plugin (expand template haskell definitions)"
}]
},
{
"title": "Haddock comments",
"type": "section",
"children": [
{
"key": "haskell.plugin.haddockComments.globalOn",
"title": "Enable",
"type": "boolean",
"default": true,
"description": "Enables haddock comments plugin"
}]
},
{
"title": "Class",
"type": "section",
"children": [
{
"key": "haskell.plugin.class.globalOn",
"title": "Enable",
"type": "boolean",
"default": true,
"description": "Enables type class plugin"
}]
},
{
"title": "Retrie",
"type": "section",
"children": [
{
"key": "haskell.plugin.retrie.globalOn",
"title": "Enable",
"type": "boolean",
"default": true,
"description": "Enables retrie plugin"
}]
},
{
"title": "Wingman",
"type": "section",
"children": [
{
"key": "haskell.plugin.tactics.globalOn",
"title": "Enable",
"type": "boolean",
"default": true,
"description": "Enables Wingman (tactics) plugin"
},
{
"key": "haskell.plugin.tactics.config.auto_gas",
"title": "Gas",
"description": "The depth of the search tree when performing \"Attempt to fill hole\". Bigger values will be able to derive more solutions, but will take exponentially more time.",
"default": 4,
"type": "number"
},
{
"key": "haskell.plugin.tactics.config.hole_severity",
"title": "Hole severity",
"description": "The severity to use when showing hole diagnostics.",
"values": [
1,
2,
3,
4,
null
],
"default": null,
"type": "enum"
},
{
"key": "haskell.plugin.tactics.config.max_use_ctor_actions",
"title": "Max number of constructors",
"type": "number",
"default": 5,
"description": "Maximum number of `Use constructor <x>` code actions that can appear"
},
{
"key": "haskell.plugin.tactics.config.timeout_duration",
"title": "Timeout",
"description": "The timeout for Wingman actions, in seconds",
"default": 2,
"type": "number"
},
{
"key": "haskell.plugin.tactics.config.proofstate_styling",
"title": "Proof states",
"description": "Should Wingman emit styling markup when showing metaprogram proof states?",
"default": true,
"type": "boolean"
}]
},
{
"title": "Pragmas",
"type": "section",
"children": [
{
"key": "haskell.plugin.pragmas.codeActionsOn",
"title": "Enable code actions",
"type": "boolean",
"default": true,
"description": "Enables pragmas code actions"
},
{
"key": "haskell.plugin.pragmas.completionOn",
"title": "Enable completions",
"type": "boolean",
"default": true,
"description": "Enables pragmas completions"
}]
},
{
"title": "Type lenses",
"description": "Not currently implemented in Nova",
"type": "section",
"children": [
{
"key": "haskell.plugin.ghcide-type-lenses.globalOn",
"title": "Enable",
"type": "boolean",
"default": true,
"description": "Enables type lenses plugin"
},
{
"key": "haskell.plugin.ghcide-type-lenses.config.mode",
"title": "Mode",
"type": "enum",
"default": true,
"description": "Control how type lenses are shown",
"values": ["always", "exported", "diagnostics"]
}]
},
{
"title": "Refine imports",
"type": "section",
"children": [
{
"key": "haskell.plugin.refineImports.globalOn",
"title": "Enable",
"type": "boolean",
"default": true,
"description": "Enables refine imports plugin"
}]
}
]
}],
"activationEvents": ["onLanguage:haskell", "onLanguage:hs"],
"commands":
{
"editor": [
{
"title": "Format file with Haskell Language Server",
"command": "format",
"when": "editorSyntax == 'haskell' && editorHasFocus",
"filters":
{
"syntaxes": ["haskell"]
}
}],
"extensions": [
{
"title": "Stop",
"paletteTitle": "Stop Haskell Language Server",
"command": "stop"
},
{
"title": "Restart",
"paletteTitle": "Restart Haskell Language Server",
"command": "restart"
},
{
"title": "Clear cached versions",
"paletteTitle": "Clear cached versions of Haskell Language Server",
"command": "clear-cache"
}]
}
}