Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 33022b3

Browse files
committed
Restart LSP when extension configuration changes
1 parent 8e179b9 commit 33022b3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/extension.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,15 @@ export function activate(context: ExtensionContext) {
1616
let visualizer: Visualize | null = null;
1717

1818
context.subscriptions.push(
19+
outputChannel,
1920
commands.registerCommand("syntaxTree.start", startLanguageServer),
2021
commands.registerCommand("syntaxTree.stop", stopLanguageServer),
2122
commands.registerCommand("syntaxTree.restart", restartLanguageServer),
2223
commands.registerCommand("syntaxTree.visualize", () => visualizer?.visualize()),
2324
commands.registerCommand("syntaxTree.showOutputChannel", () => outputChannel.show()),
24-
outputChannel
25+
workspace.onDidChangeConfiguration(event =>
26+
event.affectsConfiguration("syntaxTree") &&
27+
restartLanguageServer())
2528
);
2629

2730
return startLanguageServer();

0 commit comments

Comments
 (0)