Skip to main content

Module SetTextEditorDecorations

Module SetTextEditorDecorations 

Source
Expand description

Cocoon โ†’ Mountain window.setTextEditorDecorations notification.

Fired whenever an extension calls editor.setDecorations(decorationType, rangesOrOptions). Mountain forwards the payload as sky://decoration/set-ranges so Skyโ€™s ICodeEditorService can apply the ranges to the Monaco editor for the matching URI.

Payload shape (from Cocoon Window/Namespace.ts):

{
  "decorationTypeKey": "GitLens.blame",
  "uri": "file:///path/to/file.ts",
  "rangesOrOptions": [
    { "range": { "startLineNumber": 1, "startColumn": 1, "endLineNumber": 1, "endColumn": 80 } }
  ]
}

Channel-drain batching: ~5-200 calls per extension per second during scroll; one Tauri event per frame (16 ms window, drain stragglers).

Structsยง

DecoSetChannel ๐Ÿ”’
DecoSetItem ๐Ÿ”’

Staticsยง

DECO_SET_CH ๐Ÿ”’

Functionsยง

GetOrInitChannel ๐Ÿ”’
SetTextEditorDecorations