mirror of
https://github.com/microsoft/vscode-extension-samples.git
synced 2026-04-27 16:55:44 +08:00
Multi Server example cleanup
This commit is contained in:
@ -12,5 +12,4 @@ The example uses proposed Language Server protocol. So the code demoed here migh
|
||||
- Switch to the Debug viewlet
|
||||
- Select `Launch Client` from the drop down
|
||||
- Run the lauch config
|
||||
- If you want to debug the server as well use the launch configuration `Attach to Server`
|
||||
|
||||
- If you want to debug the server as well use the launch configuration `Attach to Server`
|
||||
@ -9,27 +9,38 @@
|
||||
"activationEvents": [
|
||||
"onLanguage:plaintext"
|
||||
],
|
||||
"main": "./out/src/extension",
|
||||
"contributes": {
|
||||
"configuration": {
|
||||
"type": "object",
|
||||
"title": "Multi LSP configuration",
|
||||
"properties": {
|
||||
"lsp-multi-server-example.enable": {
|
||||
"lspMultiServerSample.enable": {
|
||||
"scope": "resource",
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "Controls the enablement."
|
||||
},
|
||||
"lsp-multi-server-example.options": {
|
||||
"lspMultiServerSample.options": {
|
||||
"scope": "resource",
|
||||
"type": "object",
|
||||
"default": {},
|
||||
"description": "Additional options."
|
||||
},
|
||||
"lspMultiServerSample.trace.server": {
|
||||
"scope": "window",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"off",
|
||||
"messages",
|
||||
"verbose"
|
||||
],
|
||||
"default": "off",
|
||||
"description": "Traces the communication between VSCode and the language server."
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"main": "./out/extension",
|
||||
"scripts": {
|
||||
"vscode:prepublish": "tsc -p ./",
|
||||
"compile": "tsc -p ./",
|
||||
|
||||
@ -19,9 +19,9 @@ function getOuterMostWorkspaceFolder(folder: WorkspaceFolder): WorkspaceFolder {
|
||||
return result;
|
||||
}
|
||||
|
||||
export function activate(_context: ExtensionContext) {
|
||||
export function activate(context: ExtensionContext) {
|
||||
|
||||
let module = path.join(__dirname, '..', 'server', 'server.js');
|
||||
let module = context.asAbsolutePath(path.join('server', 'server.js'));
|
||||
let outputChannel: OutputChannel = Window.createOutputChannel('lsp-multi-server-example');
|
||||
|
||||
function didOpenTextDocument(document: TextDocument): void {
|
||||
@ -6,6 +6,7 @@
|
||||
"noImplicitReturns": true,
|
||||
"module": "commonjs",
|
||||
"target": "es6",
|
||||
"rootDir": ".",
|
||||
"outDir": "out",
|
||||
"lib": [ "es6"],
|
||||
"sourceMap": true
|
||||
|
||||
@ -1,5 +1,9 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"noImplicitAny": true,
|
||||
"noImplicitReturns": true,
|
||||
"target": "es6",
|
||||
"module": "commonjs",
|
||||
"moduleResolution": "node",
|
||||
|
||||
Reference in New Issue
Block a user