Overview
Range markers are visual adornments applied to text ranges in a buffer. They can display underlines, backgrounds, tooltips, indicators, and even embedded widgets. Common uses include error highlighting, search results, inline diagnostics, and custom decorations.RangeMarker Class
Constructor
buffer- The buffer this marker belongs to
Range Management
SetRange
range- Byte range in the buffer (start and end positions)
GetRange
ContainsLocation
loc- Position to check
true if the position is within the marker range
IntersectsRange
i- Range to check for intersection
true if ranges overlap
Visual Properties
SetColors
back- Background colortext- Text colorhighlight- Highlight/underline color
SetBackgroundColor
SetTextColor
SetHighlightColor
SetAlpha
GetBackgroundColor
GetTextColor
GetHighlightColor
GetAlpha
Metadata
SetName
GetName
SetDescription
GetDescription
State Management
SetEnabled
Widget Support
SetInlineSize
size- Width and height of the inline widget
GetInlineSize
Buffer Interaction
GetBuffer
RangeMarkerType
Defines the semantic type of marker:RangeMarkerDisplayType
Controls how the marker is visually rendered (flags can be combined):ToolTipPos
Tooltip positioning:FlashType
Animation type for timed markers:Public Fields
TheRangeMarker class exposes several public fields for direct access:
