Skip to content

Commit

Permalink
Update dependencies (microsoft#931)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbaeumer committed Dec 7, 2023
1 parent bb0e35e commit 9525afc
Show file tree
Hide file tree
Showing 9 changed files with 2,096 additions and 2,126 deletions.
2 changes: 1 addition & 1 deletion lsp-user-input-sample/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"typescript"
],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"eslint.workingDirectories": [
"./client",
Expand Down
160 changes: 74 additions & 86 deletions lsp-user-input-sample/client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions lsp-user-input-sample/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
"url": "https://github.com/Microsoft/vscode-extension-samples/issues"
},
"engines": {
"vscode": "^1.52.0"
"vscode": "^1.84.0"
},
"devDependencies": {
"@types/vscode": "1.52.0"
"@types/vscode": "^1.84.0"
},
"dependencies": {
"vscode-languageclient": "^7.0.0"
"vscode-languageclient": "^9.0.1"
}
}
14 changes: 7 additions & 7 deletions lsp-user-input-sample/client/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import * as path from 'path';
import { ExtensionContext, window as Window } from 'vscode';
import { LanguageClient, LanguageClientOptions, RevealOutputChannelOn, ServerOptions, TransportKind } from 'vscode-languageclient/node';

export function activate(context: ExtensionContext): void {
let client: LanguageClient;
export async function activate(context: ExtensionContext): Promise<void> {
const serverModule = context.asAbsolutePath(path.join('server', 'out', 'sampleServer.js'));
let serverOptions: ServerOptions = {
run: { module: serverModule, transport: TransportKind.ipc, options: { cwd: process.cwd() } },
Expand All @@ -33,19 +34,18 @@ export function activate(context: ExtensionContext): void {
}
};

let client: LanguageClient;
try {
client = new LanguageClient('UI Sample', serverOptions, clientOptions);
} catch (err) {
Window.showErrorMessage(`The extension couldn't be started. See the output channel for details.`);
return;
}
client.registerProposedFeatures();

context.subscriptions.push(
client.start(),
);
return client.start();
}

export function deactivate() {
export async function deactivate() {
if (client !== undefined) {
return client.stop();
}
}
Loading

0 comments on commit 9525afc

Please sign in to comment.