diff options
Diffstat (limited to 'editors/code/src')
-rw-r--r-- | editors/code/src/config.ts | 1 | ||||
-rw-r--r-- | editors/code/src/inlay_hints.ts | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts index 35a05131c..3b2eec8ba 100644 --- a/editors/code/src/config.ts +++ b/editors/code/src/config.ts | |||
@@ -12,6 +12,7 @@ export class Config { | |||
12 | private readonly requiresReloadOpts = [ | 12 | private readonly requiresReloadOpts = [ |
13 | "serverPath", | 13 | "serverPath", |
14 | "cargo", | 14 | "cargo", |
15 | "procMacro", | ||
15 | "files", | 16 | "files", |
16 | "highlighting", | 17 | "highlighting", |
17 | "updates.channel", | 18 | "updates.channel", |
diff --git a/editors/code/src/inlay_hints.ts b/editors/code/src/inlay_hints.ts index da74f03d2..a09531797 100644 --- a/editors/code/src/inlay_hints.ts +++ b/editors/code/src/inlay_hints.ts | |||
@@ -3,13 +3,13 @@ import * as vscode from 'vscode'; | |||
3 | import * as ra from './rust-analyzer-api'; | 3 | import * as ra from './rust-analyzer-api'; |
4 | 4 | ||
5 | import { Ctx, Disposable } from './ctx'; | 5 | import { Ctx, Disposable } from './ctx'; |
6 | import { sendRequestWithRetry, isRustDocument, RustDocument, RustEditor } from './util'; | 6 | import { sendRequestWithRetry, isRustDocument, RustDocument, RustEditor, sleep } from './util'; |
7 | 7 | ||
8 | 8 | ||
9 | export function activateInlayHints(ctx: Ctx) { | 9 | export function activateInlayHints(ctx: Ctx) { |
10 | const maybeUpdater = { | 10 | const maybeUpdater = { |
11 | updater: null as null | HintsUpdater, | 11 | updater: null as null | HintsUpdater, |
12 | onConfigChange() { | 12 | async onConfigChange() { |
13 | if ( | 13 | if ( |
14 | !ctx.config.inlayHints.typeHints && | 14 | !ctx.config.inlayHints.typeHints && |
15 | !ctx.config.inlayHints.parameterHints && | 15 | !ctx.config.inlayHints.parameterHints && |
@@ -17,6 +17,7 @@ export function activateInlayHints(ctx: Ctx) { | |||
17 | ) { | 17 | ) { |
18 | return this.dispose(); | 18 | return this.dispose(); |
19 | } | 19 | } |
20 | await sleep(100); | ||
20 | if (this.updater) { | 21 | if (this.updater) { |
21 | this.updater.syncCacheAndRenderHints(); | 22 | this.updater.syncCacheAndRenderHints(); |
22 | } else { | 23 | } else { |