@@ -5,7 +5,7 @@ import { Config } from './config';
|
||||
import { CallHierarchyFeature } from 'vscode-languageclient/lib/callHierarchy.proposed';
|
||||
import { SemanticTokensFeature, DocumentSemanticsTokensSignature } from 'vscode-languageclient/lib/semanticTokens.proposed';
|
||||
|
||||
export function configToServerOptions(config: Config): object {
|
||||
export function configToServerOptions(config: Config) {
|
||||
return {
|
||||
publishDecorations: !config.highlightingSemanticTokens,
|
||||
lruCapacity: config.lruCapacity,
|
||||
|
||||
@@ -17,9 +17,11 @@ export function activateInlayHints(ctx: Ctx) {
|
||||
) {
|
||||
return this.dispose();
|
||||
}
|
||||
if (!this.updater) this.updater = new HintsUpdater(ctx);
|
||||
|
||||
this.updater.syncCacheAndRenderHints();
|
||||
if (this.updater) {
|
||||
this.updater.syncCacheAndRenderHints();
|
||||
} else {
|
||||
this.updater = new HintsUpdater(ctx);
|
||||
}
|
||||
},
|
||||
dispose() {
|
||||
this.updater?.dispose();
|
||||
@@ -126,7 +128,7 @@ class HintsUpdater implements Disposable {
|
||||
this.syncCacheAndRenderHints();
|
||||
}
|
||||
|
||||
public syncCacheAndRenderHints() {
|
||||
syncCacheAndRenderHints() {
|
||||
// FIXME: make inlayHints request pass an array of files?
|
||||
this.sourceFiles.forEach((file, uri) => this.fetchHints(file).then(hints => {
|
||||
if (!hints) return;
|
||||
|
||||
@@ -95,7 +95,7 @@ export async function activate(context: vscode.ExtensionContext) {
|
||||
vscode.workspace.onDidChangeConfiguration(
|
||||
_ => ctx?.client?.sendNotification('workspace/didChangeConfiguration', { settings: "" }),
|
||||
null,
|
||||
ctx?.subscriptions,
|
||||
ctx.subscriptions,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user