Skip to content

Commit d9386f4

Browse files
authored
Merge pull request #188 from alanz/no-lsp-flag-config
Introduce noLspParam flag to config
2 parents 23a3ee3 + 6e5216b commit d9386f4

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

Changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
### 0.0.33
2+
3+
* Introduced configuration setting `noLspParam`, default `false` to control
4+
setting the `--lsp` flag for the hie server. So by default we will set the
5+
command line argument for the server, but it can be turned off.
6+
17
### 0.0.32
28

39
* Re-enable the `--lsp` flag for the hie server

package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "vscode-hie-server",
33
"displayName": "Haskell Language Server",
44
"description": "Language Server Protocol for Haskell via HIE",
5-
"version": "0.0.32",
5+
"version": "0.0.33",
66
"license": "MIT",
77
"publisher": "alanz",
88
"engines": {
@@ -109,6 +109,12 @@
109109
"description":
110110
"Specify the full path to your own custom hie wrapper (e.g. ${HOME}/.hie-wrapper.sh). Works with ~, ${HOME} and ${workspaceFolder}."
111111
},
112+
"languageServerHaskell.noLspParam": {
113+
"scope": "resource",
114+
"type": "boolean",
115+
"default": false,
116+
"description": "Do not set the '--lsp' flag in the hie/hie-wrapper arguments when launching it"
117+
},
112118
"languageServerHaskell.showTypeForSelection.onHover": {
113119
"scope": "resource",
114120
"type": "boolean",

src/extension.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ function activateHieNoCheck(context: ExtensionContext, folder: WorkspaceFolder,
106106
const useCustomWrapper = workspace.getConfiguration('languageServerHaskell', uri).useCustomHieWrapper;
107107
let hieExecutablePath = workspace.getConfiguration('languageServerHaskell', uri).hieExecutablePath;
108108
let customWrapperPath = workspace.getConfiguration('languageServerHaskell', uri).useCustomHieWrapperPath;
109+
const noLspParam = workspace.getConfiguration('languageServerHaskell', uri).noLspParam;
109110
const logLevel = workspace.getConfiguration('languageServerHaskell', uri).trace.server;
110111
const logFile = workspace.getConfiguration('languageServerHaskell', uri).logFile;
111112

@@ -148,7 +149,7 @@ function activateHieNoCheck(context: ExtensionContext, folder: WorkspaceFolder,
148149
} else if (logLevel === 'messages') {
149150
debugArgs = ['-d'];
150151
}
151-
if (!useCustomWrapper) {
152+
if (!noLspParam) {
152153
runArgs.unshift('--lsp');
153154
debugArgs.unshift('--lsp');
154155
}

0 commit comments

Comments
 (0)