mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-13 21:54:42 +00:00
vscode: extract Type and Param hint cases of InlayHint at type level (needed further)
This commit is contained in:
parent
013e908056
commit
0e6d066a29
1 changed files with 14 additions and 8 deletions
|
@ -86,14 +86,20 @@ export interface Runnable {
|
||||||
export const runnables = request<RunnablesParams, Vec<Runnable>>("runnables");
|
export const runnables = request<RunnablesParams, Vec<Runnable>>("runnables");
|
||||||
|
|
||||||
|
|
||||||
export const enum InlayKind {
|
|
||||||
TypeHint = "TypeHint",
|
export type InlayHint = InlayHint.TypeHint | InlayHint.ParamHint;
|
||||||
ParameterHint = "ParameterHint",
|
|
||||||
}
|
export namespace InlayHint {
|
||||||
export interface InlayHint {
|
export const enum Kind {
|
||||||
range: lc.Range;
|
TypeHint = "TypeHint",
|
||||||
kind: InlayKind;
|
ParamHint = "ParameterHint",
|
||||||
label: string;
|
}
|
||||||
|
interface Common {
|
||||||
|
range: lc.Range;
|
||||||
|
label: string;
|
||||||
|
}
|
||||||
|
export type TypeHint = Common & { kind: Kind.TypeHint; }
|
||||||
|
export type ParamHint = Common & { kind: Kind.ParamHint; }
|
||||||
}
|
}
|
||||||
export interface InlayHintsParams {
|
export interface InlayHintsParams {
|
||||||
textDocument: lc.TextDocumentIdentifier;
|
textDocument: lc.TextDocumentIdentifier;
|
||||||
|
|
Loading…
Reference in a new issue