Skip to content
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
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,12 @@
"default": "",
"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."
},
"haskell.serverExtraArgs": {
"scope": "resource",
"type": "string",
"default": "",
"markdownDescription": "Pass additional arguments to the language server."
},
"haskell.updateBehavior": {
"scope": "machine",
"type": "string",
Expand Down
5 changes: 5 additions & 0 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,11 @@ async function activateServerForFolder(context: ExtensionContext, uri: Uri, fold
args = args.concat(['-l', logFile]);
}

let extraArgs: string = workspace.getConfiguration('haskell', uri).serverExtraArgs;
if (extraArgs !== null) {
args = args.concat(extraArgs.split(' '));
}

// If we're operating on a standalone file (i.e. not in a folder) then we need
// to launch the server in a reasonable current directory. Otherwise the cradle
// guessing logic in hie-bios will be wrong!
Expand Down