提交 3f4f7303 编写于 作者: C Coenraad Stijne

expose stickyness decoration option

上级 e1b9f94c
......@@ -1616,6 +1616,7 @@ export interface IEditorContribution {
* @internal
*/
export interface IThemeDecorationRenderOptions {
stickiness?: TrackedRangeStickiness;
backgroundColor?: string;
outline?: string;
......
......@@ -698,6 +698,16 @@ declare module 'vscode' {
Full = 7
}
/**
* Describes the behaviour of decorations when typing/editing near their edges.
*/
export enum TrackedRangeStickiness {
AlwaysGrowsWhenTypingAtEdges = 0,
NeverGrowsWhenTypingAtEdges = 1,
GrowsOnlyWhenTypingBefore = 2,
GrowsOnlyWhenTypingAfter = 3
}
/**
* Represents options to configure the behavior of showing a [document](#TextDocument) in an [editor](#TextEditor).
*/
......@@ -725,6 +735,12 @@ declare module 'vscode' {
* Represents theme specific rendering styles for a [text editor decoration](#TextEditorDecorationType).
*/
export interface ThemableDecorationRenderOptions {
/**
* Customize the growing behaviour of the decoration when typing at the edges of the decoration.
* Defaults to TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges
*/
stickiness?: TrackedRangeStickiness;
/**
* Background color of the decoration. Use rgba() and define transparent background colors to play well with other decorations.
*/
......
......@@ -515,6 +515,7 @@ export function createApiFactory(
OverviewRulerLane: EditorCommon.OverviewRulerLane,
ParameterInformation: extHostTypes.ParameterInformation,
Position: extHostTypes.Position,
ProgressLocation: extHostTypes.ProgressLocation,
Range: extHostTypes.Range,
Selection: extHostTypes.Selection,
SignatureHelp: extHostTypes.SignatureHelp,
......@@ -529,10 +530,10 @@ export function createApiFactory(
TextEditorLineNumbersStyle: extHostTypes.TextEditorLineNumbersStyle,
TextEditorRevealType: extHostTypes.TextEditorRevealType,
TextEditorSelectionChangeKind: extHostTypes.TextEditorSelectionChangeKind,
TrackedRangeStickiness: EditorCommon.TrackedRangeStickiness,
Uri: URI,
ViewColumn: extHostTypes.ViewColumn,
WorkspaceEdit: extHostTypes.WorkspaceEdit,
ProgressLocation: extHostTypes.ProgressLocation,
// functions
FileLocationKind: extHostTypes.FileLocationKind,
ApplyToKind: extHostTypes.ApplyToKind,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册