Overlay Operations
addOverlay
Add a visual overlay to a buffer range.Target buffer ID
Namespace for grouping (use for batch removal)
Start byte offset
End byte offset
Foreground red (0-255)
Foreground green (0-255)
Foreground blue (0-255)
Background red (0-255, or -1 for transparent)
Background green (0-255, or -1 for transparent)
Background blue (0-255, or -1 for transparent)
Add underline decoration
Use bold text
Use italic text
Extend background to end of visual line
true if overlay was added successfullyOverlays persist until explicitly removed. Use namespaces for batch removal (e.g., “spell”, “todo”). Multiple overlays can apply to the same range; colors blend.
removeOverlay
Remove a specific overlay by its handle.The buffer ID
The overlay handle to remove
true if overlay was removedclearNamespace
Clear all overlays in a namespace.The buffer ID
The namespace to clear
true if namespace was clearedclearOverlaysInRange
Clear all overlays that overlap with a byte range.The buffer ID
Start byte position (inclusive)
End byte position (exclusive)
true if overlays were clearedclearAllOverlays
Remove all overlays from a buffer.The buffer ID
true if all overlays were clearedVirtual Text
Virtual text appears inline in the buffer without modifying the actual content. Useful for displaying inline hints, diagnostics, or git blame information.addVirtualText
Add virtual text (inline decoration) at a position.The buffer ID
Unique identifier for this virtual text
Byte position to insert at
The virtual text to display
Red color component (0-255)
Green color component (0-255)
Blue color component (0-255)
Whether to insert before (true) or after (false) the position
Whether to use the color as background (true) or foreground (false)
true if virtual text was addedremoveVirtualText
Remove virtual text by ID.The buffer ID
The virtual text ID to remove
true if virtual text was removedremoveVirtualTextsByPrefix
Remove all virtual texts with IDs starting with a prefix.The buffer ID
The prefix to match virtual text IDs against
true if virtual texts were removedclearVirtualTexts
Remove all virtual texts from a buffer.The buffer ID
true if all virtual texts were clearedclearVirtualTextNamespace
Clear all virtual texts in a namespace.The buffer ID
The namespace to clear (e.g., “git-blame”)
true if namespace was clearedLine Decorations
addVirtualLine
Add a virtual line above or below a source line.The buffer ID
Byte position to anchor the virtual line to
The text content of the virtual line
Foreground red color component (0-255)
Foreground green color component (0-255)
Foreground blue color component (0-255)
Background red color component (0-255), -1 for transparent
Background green color component (0-255), -1 for transparent
Background blue color component (0-255), -1 for transparent
Whether to insert above (true) or below (false) the line
Namespace for bulk removal (e.g., “git-blame”)
Priority for ordering multiple lines at same position
true if virtual line was addedsetLineIndicator
Set a line indicator in the gutter’s indicator column.The buffer ID
Line number (0-indexed)
Namespace for grouping (e.g., “git-gutter”, “breakpoints”)
Symbol to display (e.g., ”│”, ”●”, ”★”)
Red color component (0-255)
Green color component (0-255)
Blue color component (0-255)
Priority for display when multiple indicators exist (higher wins)
true if line indicator was setclearLineIndicators
Clear all line indicators for a specific namespace.The buffer ID
Namespace to clear (e.g., “git-gutter”)
true if line indicators were cleared