mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 18:49:00 +01:00
add InlayHint#tooltip and wire it up with hover participant, https://github.com/microsoft/vscode/issues/129528
This commit is contained in:
@@ -1155,10 +1155,11 @@ export namespace InlayHint {
|
||||
export function from(hint: vscode.InlayHint): modes.InlayHint {
|
||||
return {
|
||||
text: hint.text,
|
||||
tooltip: hint.tooltip && MarkdownString.from(hint.tooltip),
|
||||
position: Position.from(hint.position),
|
||||
kind: InlayHintKind.from(hint.kind ?? types.InlayHintKind.Other),
|
||||
whitespaceBefore: hint.whitespaceBefore,
|
||||
whitespaceAfter: hint.whitespaceAfter
|
||||
whitespaceAfter: hint.whitespaceAfter,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1168,6 +1169,7 @@ export namespace InlayHint {
|
||||
Position.to(hint.position),
|
||||
InlayHintKind.to(hint.kind)
|
||||
);
|
||||
res.tooltip = htmlContent.isMarkdownString(hint.tooltip) ? MarkdownString.to(hint.tooltip) : hint.tooltip;
|
||||
res.whitespaceAfter = hint.whitespaceAfter;
|
||||
res.whitespaceBefore = hint.whitespaceBefore;
|
||||
return res;
|
||||
|
||||
@@ -1423,6 +1423,7 @@ export enum InlayHintKind {
|
||||
@es5ClassCompat
|
||||
export class InlayHint {
|
||||
text: string;
|
||||
tooltip?: string | vscode.MarkdownString;
|
||||
position: Position;
|
||||
kind?: vscode.InlayHintKind;
|
||||
whitespaceBefore?: boolean;
|
||||
|
||||
Reference in New Issue
Block a user