Skip to content
This repository was archived by the owner on Nov 18, 2022. It is now read-only.

Commit 62d1ce7

Browse files
committed
Register the folder/editor change events under extension disposables
1 parent 61838af commit 62d1ce7

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/extension.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,16 @@ interface ProgressParams {
4646
}
4747

4848
export async function activate(context: ExtensionContext) {
49-
context.subscriptions.push(configureLanguage());
50-
context.subscriptions.push(...registerCommands());
51-
52-
workspace.onDidChangeWorkspaceFolders(whenChangingWorkspaceFolders);
53-
window.onDidChangeActiveTextEditor(onDidChangeActiveTextEditor);
54-
// Trigger manually logic for opening the first active editor
49+
context.subscriptions.push(
50+
...[
51+
configureLanguage(),
52+
...registerCommands(),
53+
workspace.onDidChangeWorkspaceFolders(whenChangingWorkspaceFolders),
54+
window.onDidChangeActiveTextEditor(onDidChangeActiveTextEditor),
55+
],
56+
);
57+
// Manually trigger the first event to start up server instance if necessary,
58+
// since VSCode doesn't do that on startup by itself.
5559
onDidChangeActiveTextEditor(window.activeTextEditor);
5660

5761
// Migrate the users of multi-project setup for RLS to disable the setting

0 commit comments

Comments
 (0)