diff options
-rw-r--r-- | editors/code/src/rust-analyzer-api.ts | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/editors/code/src/rust-analyzer-api.ts b/editors/code/src/rust-analyzer-api.ts index c5a010e94..6a7aeb602 100644 --- a/editors/code/src/rust-analyzer-api.ts +++ b/editors/code/src/rust-analyzer-api.ts | |||
@@ -86,14 +86,20 @@ export interface Runnable { | |||
86 | export const runnables = request<RunnablesParams, Vec<Runnable>>("runnables"); | 86 | export const runnables = request<RunnablesParams, Vec<Runnable>>("runnables"); |
87 | 87 | ||
88 | 88 | ||
89 | export const enum InlayKind { | 89 | |
90 | TypeHint = "TypeHint", | 90 | export type InlayHint = InlayHint.TypeHint | InlayHint.ParamHint; |
91 | ParameterHint = "ParameterHint", | 91 | |
92 | } | 92 | export namespace InlayHint { |
93 | export interface InlayHint { | 93 | export const enum Kind { |
94 | range: lc.Range; | 94 | TypeHint = "TypeHint", |
95 | kind: InlayKind; | 95 | ParamHint = "ParameterHint", |
96 | label: string; | 96 | } |
97 | interface Common { | ||
98 | range: lc.Range; | ||
99 | label: string; | ||
100 | } | ||
101 | export type TypeHint = Common & { kind: Kind.TypeHint; } | ||
102 | export type ParamHint = Common & { kind: Kind.ParamHint; } | ||
97 | } | 103 | } |
98 | export interface InlayHintsParams { | 104 | export interface InlayHintsParams { |
99 | textDocument: lc.TextDocumentIdentifier; | 105 | textDocument: lc.TextDocumentIdentifier; |