Skip to content

Commit 4f67577

Browse files
authored
Merge branch 'master' into add-config-options
2 parents 2549193 + b9c5e97 commit 4f67577

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,12 @@
132132
"default": "",
133133
"markdownDescription": "Manually set a language server executable. Can be something on the $PATH or a path to an executable itself. Works with `~,` `${HOME}` and `${workspaceFolder}`. **Deprecated scope**: This option will be set to `machine` scope in a future release, so it can be changed only globally, not per workspace."
134134
},
135+
"haskell.serverExtraArgs": {
136+
"scope": "resource",
137+
"type": "string",
138+
"default": "",
139+
"markdownDescription": "Pass additional arguments to the language server."
140+
},
135141
"haskell.updateBehavior": {
136142
"scope": "machine",
137143
"type": "string",

src/extension.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,11 @@ async function activateServerForFolder(context: ExtensionContext, uri: Uri, fold
196196
args = args.concat(['-l', logFile]);
197197
}
198198

199+
let extraArgs: string = workspace.getConfiguration('haskell', uri).serverExtraArgs;
200+
if (extraArgs !== null) {
201+
args = args.concat(extraArgs.split(' '));
202+
}
203+
199204
// If we're operating on a standalone file (i.e. not in a folder) then we need
200205
// to launch the server in a reasonable current directory. Otherwise the cradle
201206
// guessing logic in hie-bios will be wrong!

0 commit comments

Comments
 (0)