More attempt to fix vscode-spring-boot launcher code
This commit is contained in:
@@ -8,7 +8,7 @@ import * as FS from 'fs';
|
||||
import * as Net from 'net';
|
||||
import * as ChildProcess from 'child_process';
|
||||
import {LanguageClient, LanguageClientOptions, SettingMonitor, ServerOptions, StreamInfo} from 'vscode-languageclient';
|
||||
import {TextDocument} from 'vscode';
|
||||
import { workspace, TextDocument } from 'vscode';
|
||||
|
||||
import * as commons from 'commons-vscode';
|
||||
|
||||
@@ -22,7 +22,8 @@ export function activate(context: VSCode.ExtensionContext) {
|
||||
DEBUG: false,
|
||||
CONNECT_TO_LS: false,
|
||||
extensionId: 'vscode-spring-boot',
|
||||
launcher: (context: VSCode.ExtensionContext) => Path.resolve(context.extensionPath, 'jars/language-server.jar'),
|
||||
preferJdk: true,
|
||||
launcher: (context: VSCode.ExtensionContext) => 'org.springframework.boot.loader.JarLauncher',
|
||||
classpath: (context: VSCode.ExtensionContext, jvm: commons.JVM) => {
|
||||
const classpath = [
|
||||
Path.resolve(context.extensionPath, 'jars/language-server.jar')
|
||||
@@ -37,7 +38,14 @@ export function activate(context: VSCode.ExtensionContext) {
|
||||
return classpath;
|
||||
},
|
||||
clientOptions: {
|
||||
documentSelector: [ PROPERTIES_LANGUAGE_ID, YAML_LANGUAGE_ID, JAVA_LANGUAGE_ID ]
|
||||
documentSelector: [ PROPERTIES_LANGUAGE_ID, YAML_LANGUAGE_ID, JAVA_LANGUAGE_ID ],
|
||||
synchronize: {
|
||||
configurationSection: 'boot-java'
|
||||
},
|
||||
initializationOptions: {
|
||||
workspaceFolders: workspace.workspaceFolders ? workspace.workspaceFolders.map(f => f.uri.toString()) : null
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
let clientPromise = commons.activate(options, context);
|
||||
|
||||
Reference in New Issue
Block a user