aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVeetaha <[email protected]>2020-02-29 17:27:52 +0000
committerVeetaha <[email protected]>2020-03-07 12:08:35 +0000
commit0e6d066a2940c65af9171dff52304590cac4b95e (patch)
tree2994e3d996e2ed92f0f1aaf00b22b8a4391a772f
parent013e9080564aa497e6de92ae4bd1f162328b3cd8 (diff)
vscode: extract Type and Param hint cases of InlayHint at type level (needed further)
-rw-r--r--editors/code/src/rust-analyzer-api.ts22
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 {
86export const runnables = request<RunnablesParams, Vec<Runnable>>("runnables"); 86export const runnables = request<RunnablesParams, Vec<Runnable>>("runnables");
87 87
88 88
89export const enum InlayKind { 89
90 TypeHint = "TypeHint", 90export type InlayHint = InlayHint.TypeHint | InlayHint.ParamHint;
91 ParameterHint = "ParameterHint", 91
92} 92export namespace InlayHint {
93export 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}
98export interface InlayHintsParams { 104export interface InlayHintsParams {
99 textDocument: lc.TextDocumentIdentifier; 105 textDocument: lc.TextDocumentIdentifier;