aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editors/code/src/commands/inlay_hints.ts16
1 files changed, 7 insertions, 9 deletions
diff --git a/editors/code/src/commands/inlay_hints.ts b/editors/code/src/commands/inlay_hints.ts
index ac7dcce60..6d00152f8 100644
--- a/editors/code/src/commands/inlay_hints.ts
+++ b/editors/code/src/commands/inlay_hints.ts
@@ -1,14 +1,13 @@
1import * as vscode from 'vscode'; 1import * as vscode from 'vscode';
2import { Range, TextDocumentChangeEvent, TextEditor } from 'vscode'; 2import * as lc from 'vscode-languageclient';
3import { TextDocumentIdentifier } from 'vscode-languageclient';
4import { Server } from '../server'; 3import { Server } from '../server';
5 4
6interface InlayHintsParams { 5interface InlayHintsParams {
7 textDocument: TextDocumentIdentifier; 6 textDocument: lc.TextDocumentIdentifier;
8} 7}
9 8
10interface InlayHint { 9interface InlayHint {
11 range: Range; 10 range: vscode.Range;
12 kind: string; 11 kind: string;
13 label: string; 12 label: string;
14} 13}
@@ -32,11 +31,10 @@ export class HintsUpdater {
32 } 31 }
33 32
34 public async refreshHintsForVisibleEditors( 33 public async refreshHintsForVisibleEditors(
35 cause?: TextDocumentChangeEvent, 34 cause?: vscode.TextDocumentChangeEvent,
36 ): Promise<void> { 35 ): Promise<void> {
37 if (!this.displayHints) { 36 if (!this.displayHints) return;
38 return; 37
39 }
40 if ( 38 if (
41 cause !== undefined && 39 cause !== undefined &&
42 (cause.contentChanges.length === 0 || 40 (cause.contentChanges.length === 0 ||
@@ -79,7 +77,7 @@ export class HintsUpdater {
79 } 77 }
80 78
81 private async updateDecorationsFromServer( 79 private async updateDecorationsFromServer(
82 editor: TextEditor, 80 editor: vscode.TextEditor,
83 ): Promise<void> { 81 ): Promise<void> {
84 const newHints = await this.queryHints(editor.document.uri.toString()); 82 const newHints = await this.queryHints(editor.document.uri.toString());
85 if (newHints !== null) { 83 if (newHints !== null) {