aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src
diff options
context:
space:
mode:
Diffstat (limited to 'editors/code/src')
-rw-r--r--editors/code/src/client.ts2
-rw-r--r--editors/code/src/inlay_hints.ts10
-rw-r--r--editors/code/src/main.ts2
3 files changed, 8 insertions, 6 deletions
diff --git a/editors/code/src/client.ts b/editors/code/src/client.ts
index 34965e2fb..d72ecc58f 100644
--- a/editors/code/src/client.ts
+++ b/editors/code/src/client.ts
@@ -5,7 +5,7 @@ import { Config } from './config';
5import { CallHierarchyFeature } from 'vscode-languageclient/lib/callHierarchy.proposed'; 5import { CallHierarchyFeature } from 'vscode-languageclient/lib/callHierarchy.proposed';
6import { SemanticTokensFeature, DocumentSemanticsTokensSignature } from 'vscode-languageclient/lib/semanticTokens.proposed'; 6import { SemanticTokensFeature, DocumentSemanticsTokensSignature } from 'vscode-languageclient/lib/semanticTokens.proposed';
7 7
8export function configToServerOptions(config: Config): object { 8export function configToServerOptions(config: Config) {
9 return { 9 return {
10 publishDecorations: !config.highlightingSemanticTokens, 10 publishDecorations: !config.highlightingSemanticTokens,
11 lruCapacity: config.lruCapacity, 11 lruCapacity: config.lruCapacity,
diff --git a/editors/code/src/inlay_hints.ts b/editors/code/src/inlay_hints.ts
index 98663e0e3..6a8bd942e 100644
--- a/editors/code/src/inlay_hints.ts
+++ b/editors/code/src/inlay_hints.ts
@@ -17,9 +17,11 @@ export function activateInlayHints(ctx: Ctx) {
17 ) { 17 ) {
18 return this.dispose(); 18 return this.dispose();
19 } 19 }
20 if (!this.updater) this.updater = new HintsUpdater(ctx); 20 if (this.updater) {
21 21 this.updater.syncCacheAndRenderHints();
22 this.updater.syncCacheAndRenderHints(); 22 } else {
23 this.updater = new HintsUpdater(ctx);
24 }
23 }, 25 },
24 dispose() { 26 dispose() {
25 this.updater?.dispose(); 27 this.updater?.dispose();
@@ -126,7 +128,7 @@ class HintsUpdater implements Disposable {
126 this.syncCacheAndRenderHints(); 128 this.syncCacheAndRenderHints();
127 } 129 }
128 130
129 public syncCacheAndRenderHints() { 131 syncCacheAndRenderHints() {
130 // FIXME: make inlayHints request pass an array of files? 132 // FIXME: make inlayHints request pass an array of files?
131 this.sourceFiles.forEach((file, uri) => this.fetchHints(file).then(hints => { 133 this.sourceFiles.forEach((file, uri) => this.fetchHints(file).then(hints => {
132 if (!hints) return; 134 if (!hints) return;
diff --git a/editors/code/src/main.ts b/editors/code/src/main.ts
index 63d145db0..a46dbde33 100644
--- a/editors/code/src/main.ts
+++ b/editors/code/src/main.ts
@@ -95,7 +95,7 @@ export async function activate(context: vscode.ExtensionContext) {
95 vscode.workspace.onDidChangeConfiguration( 95 vscode.workspace.onDidChangeConfiguration(
96 _ => ctx?.client?.sendNotification('workspace/didChangeConfiguration', { settings: "" }), 96 _ => ctx?.client?.sendNotification('workspace/didChangeConfiguration', { settings: "" }),
97 null, 97 null,
98 ctx?.subscriptions, 98 ctx.subscriptions,
99 ); 99 );
100} 100}
101 101