Skip to content

Commit ef7e1c6

Browse files
authored
[vscode-extension] Add serverArguments configuration to allow setting flags for sourcekit-lsp (#265)
* Add serverArguments extension configuration to allow setting flags for sourcekit-lsp
1 parent be09920 commit ef7e1c6

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

Editors/vscode/package.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,14 @@
4646
"default": "sourcekit-lsp",
4747
"description": "The path of the sourcekit-lsp executable"
4848
},
49+
"sourcekit-lsp.serverArguments": {
50+
"type": "array",
51+
"default": [],
52+
"items": {
53+
"type": "string"
54+
},
55+
"description": "Arguments to pass to sourcekit-lsp. Argument keys and values should be provided as separate entries in the array e.g. ['--log-level', 'debug']"
56+
},
4957
"sourcekit-lsp.toolchainPath": {
5058
"type": "string",
5159
"default": "",

Editors/vscode/src/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export function activate(context: vscode.ExtensionContext) {
88

99
const sourcekit: langclient.Executable = {
1010
command: config.get<string>('serverPath', 'sourcekit-lsp'),
11-
args: []
11+
args: config.get<string[]>('serverArguments', [])
1212
};
1313

1414
const toolchain = config.get<string>('toolchainPath', '');

0 commit comments

Comments
 (0)