remove whitespaceBefore/After from InlayHint, https://github.com/microsoft/vscode/issues/16221

上级 2f33470e
......@@ -1762,8 +1762,6 @@ export interface InlayHint {
text: string;
position: IPosition;
kind: InlayHintKind;
whitespaceBefore?: boolean;
whitespaceAfter?: boolean;
}
export interface InlayHintsProvider {
......
......@@ -183,8 +183,6 @@ export class InlayHintsController implements IEditorContribution {
const fontColor = this._themeService.getColorTheme().getColor(editorInlayHintForeground);
const model = this._editor.getModel()!;
const newDecorationsTypeIds: string[] = [];
const newDecorationsData: IModelDeltaDecoration[] = [];
......@@ -193,15 +191,12 @@ export class InlayHintsController implements IEditorContribution {
for (const hint of hints) {
const { text, position, whitespaceBefore, whitespaceAfter } = hint;
const marginBefore = whitespaceBefore ? (fontSize / 3) | 0 : 0;
const marginAfter = whitespaceAfter ? (fontSize / 3) | 0 : 0;
const { text, position } = hint;
const contentOptions: IContentDecorationRenderOptions = {
contentText: fixSpace(text),
backgroundColor: `${backgroundColor}`,
color: `${fontColor}`,
margin: `0px ${marginAfter}px 0px ${marginBefore}px`,
fontSize: `${fontSize}px`,
fontFamily: `var(${fontFamilyVar})`,
padding: `0px ${(fontSize / 4) | 0}px`,
......
......@@ -6665,8 +6665,6 @@ declare namespace monaco.languages {
text: string;
position: IPosition;
kind: InlayHintKind;
whitespaceBefore?: boolean;
whitespaceAfter?: boolean;
}
export interface InlayHintsProvider {
......
......@@ -1800,14 +1800,6 @@ declare module 'vscode' {
* The kind of this hint.
*/
kind?: InlayHintKind;
/**
* Whitespace before the hint.
*/
whitespaceBefore?: boolean;
/**
* Whitespace after the hint.
*/
whitespaceAfter?: boolean;
// todo@API make range first argument
constructor(text: string, position: Position, kind?: InlayHintKind);
......
......@@ -1156,9 +1156,7 @@ export namespace InlayHint {
return {
text: hint.text,
position: Position.from(hint.position),
kind: InlayHintKind.from(hint.kind ?? types.InlayHintKind.Other),
whitespaceBefore: hint.whitespaceBefore,
whitespaceAfter: hint.whitespaceAfter
kind: InlayHintKind.from(hint.kind ?? types.InlayHintKind.Other)
};
}
......@@ -1168,8 +1166,6 @@ export namespace InlayHint {
Position.to(hint.position),
InlayHintKind.to(hint.kind)
);
res.whitespaceAfter = hint.whitespaceAfter;
res.whitespaceBefore = hint.whitespaceBefore;
return res;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册