Allow overriding vscode language server options

JAVA_HOME and heap can now be overridden by the user from
vscode worspace settings, in a similar way for all our language servers,
by setting XXX.java.home and XXX.java.heap configuration keys.
This commit is contained in:
Kris De Volder
2018-05-03 12:41:29 -07:00
parent e3301506a4
commit 15e3230e3b
9 changed files with 58 additions and 14 deletions

View File

@@ -26,6 +26,7 @@ export function activate(context: VSCode.ExtensionContext) {
VSCode.window.showWarningMessage('JAVA_HOME or PATH environment variable seems to point to a JRE. A JDK is required, hence Boot Hints are unavailable.');
}
},
workspaceOptions: VSCode.workspace.getConfiguration("spring-boot.ls"),
clientOptions: {
documentSelector: [ PROPERTIES_LANGUAGE_ID, YAML_LANGUAGE_ID, JAVA_LANGUAGE_ID ],
synchronize: {

View File

@@ -66,7 +66,17 @@
"boot-java.boot-hints.on": {
"type": "boolean",
"default": true,
"description": "Enable/Disable Spring running Boot application live hints decorators in the source code"
"description": "Enable/Disable Spring running Boot application live hints decorators in Java source code"
},
"spring-boot.ls.java.home": {
"type": ["string", null],
"default": null,
"description": "Override JAVA_HOME used for launching the spring-boot-language-server JVM process."
},
"spring-boot.ls.java.heap": {
"type": ["string", null],
"default": null,
"description": "Max JVM heap value, passed via -Xmx argument when launching spring-boot-language-server JVM process."
}
}
},
@@ -94,7 +104,7 @@
"vsce-package": "vsce package"
},
"dependencies": {
"@pivotal-tools/commons-vscode": "file:../commons-vscode/pivotal-tools-commons-vscode-0.2.1.tgz",
"@pivotal-tools/commons-vscode": "file:../commons-vscode/pivotal-tools-commons-vscode-0.2.2.tgz",
"vscode-languageclient": "^4.0.0"
},
"devDependencies": {