Skip to content
This repository was archived by the owner on Nov 6, 2018. It is now read-only.

Commit 7278eca

Browse files
committed
docs(decorations): add TextDocumentDecorations docs, remove background
BREAKING CHANGE: The decoration attachment `background` property is removed because it is not widely supported by CXP clients in the short term.
1 parent f9ece18 commit 7278eca

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

src/protocol/decoration.ts

+26-1
Original file line numberDiff line numberDiff line change
@@ -28,25 +28,50 @@ export interface DecorationServerCapabilities {
2828
decorationProvider?: DecorationProviderOptions | (DecorationProviderOptions & TextDocumentRegistrationOptions)
2929
}
3030

31+
/**
32+
* A text document decoration changes the appearance of a range in the document and/or adds other content to it.
33+
*/
3134
export interface TextDocumentDecoration {
35+
/** The range that the decoration applies to. */
3236
range: Range
3337

38+
/**
39+
* If true, the decoration applies to all lines in the range (inclusive), even if not all characters on the
40+
* line are included.
41+
*/
3442
isWholeLine?: boolean
3543

44+
/** Content to display after the range. */
3645
after?: DecorationAttachmentRenderOptions
3746

38-
background?: string
47+
/** The CSS background-color property value for the line. */
3948
backgroundColor?: string
49+
50+
/** The CSS border property value for the line. */
4051
border?: string
52+
53+
/** The CSS border-color property value for the line. */
4154
borderColor?: string
55+
56+
/** The CSS border-width property value for the line. */
4257
borderWidth?: string
4358
}
4459

60+
/** A decoration attachment adds content after a [decoration](#TextDocumentDecoration). */
4561
export interface DecorationAttachmentRenderOptions {
62+
/** The CSS background-color property value for the attachment. */
4663
backgroundColor?: string
64+
65+
/** The CSS color property value for the attachment. */
4766
color?: string
67+
68+
/** Text to display in the attachment. */
4869
contentText?: string
70+
71+
/** Tooltip text to display when hovering over the attachment. */
4972
hoverMessage?: string
73+
74+
/** If set, the attachment becomes a link with this destination URL. */
5075
linkURL?: string
5176
}
5277

0 commit comments

Comments
 (0)