Gutter Extended

Represents a gutter within a TextEditor.

See TextEditor::addGutter for information on creating a gutter.

Gutter Destruction

::destroy()

Destroys the gutter.

Event Subscription

::onDidChangeVisible(callback)

Calls your callback when the gutter’s visibility changes.

Argument Description

callback

Function

gutter

The gutter whose visibility changed.

Return values

Returns a Disposable on which .dispose() can be called to unsubscribe.

::onDidDestroy(callback)

Calls your callback when the gutter is destroyed.

Argument Description

callback

Function

Return values

Returns a Disposable on which .dispose() can be called to unsubscribe.

Visibility

::hide()

Hide the gutter.

::show()

Show the gutter.

::isVisible()

Determine whether the gutter is visible.

Return values

Returns a Boolean.

::decorateMarker(marker, decorationParams)

Add a decoration that tracks a DisplayMarker. When the marker moves, is invalidated, or is destroyed, the decoration will be updated to reflect the marker’s state.

Argument Description

marker

A DisplayMarker you want this decoration to follow.

decorationParams

An Object representing the decoration. It is passed to TextEditor::decorateMarker as its decorationParams and so supports all options documented there.

type

Caveat: set to 'line-number' if this is the line-number gutter, 'gutter' otherwise. This cannot be overridden.

Return values

Returns a Decoration object