Experimental: A container for a related set of markers at the DisplayLayer level. Wraps an underlying MarkerLayer on the TextBuffer.
This API is experimental and subject to change on any release.
Destroy this layer.
Destroy all markers in this layer.
Subscribe to be notified synchronously when this layer is destroyed.
Return values |
---|
Returns a Disposable. |
Subscribe to be notified asynchronously whenever markers are created, updated, or destroyed on this layer. Prefer this method for optimal performance when interacting with layers that could contain large numbers of markers.
Subscribers are notified once, asynchronously when any number of changes occur in a given tick of the event loop. You should re-query the layer to determine the state of markers in which you’re interested in. It may be counter-intuitive, but this is much more efficient than subscribing to events on individual markers, which are expensive to deliver.
Argument | Description |
---|---|
|
A Function that will be called with no arguments when changes occur on this layer. |
Return values |
---|
Returns a Disposable. |
Subscribe to be notified synchronously whenever markers are created on this layer. Avoid this method for optimal performance when interacting with layers that could contain large numbers of markers.
You should prefer ::onDidUpdate when synchronous notifications aren’t absolutely necessary.
Argument | Description |
---|---|
|
A Function that will be called with a TextEditorMarker whenever a new marker is created. |
Return values |
---|
Returns a Disposable. |
Create a marker with the given screen range.
Argument | Description |
---|---|
|
|
|
A hash of key-value pairs to associate with the marker. There are also reserved property names that have marker-specific meaning. |
|
optional
Boolean Creates the marker in a reversed orientation. (default: false) |
|
optional
String Determines the rules by which changes to the buffer invalidate the marker. (default: ‘overlap’) It can be any of the following strategies, in order of fragility:
|
|
Boolean indicating whether insertions at the start or end of the marked range should be interpreted as happening outside the marker. Defaults to |
|
String If |
Return values |
---|
Returns a DisplayMarker. |
Create a marker on this layer with its head at the given screen position and no tail.
Argument | Description |
---|---|
|
|
|
optional
An Object with the following keys: |
|
optional
String Determines the rules by which changes to the buffer invalidate the marker. (default: ‘overlap’) It can be any of the following strategies, in order of fragility:
|
|
Boolean indicating whether insertions at the start or end of the marked range should be interpreted as happening outside the marker. Defaults to |
|
String If |
Return values |
---|
Returns a DisplayMarker. |
Create a marker with the given buffer range.
Argument | Description |
---|---|
|
|
|
A hash of key-value pairs to associate with the marker. There are also reserved property names that have marker-specific meaning. |
|
optional
Boolean Creates the marker in a reversed orientation. (default: false) |
|
optional
String Determines the rules by which changes to the buffer invalidate the marker. (default: ‘overlap’) It can be any of the following strategies, in order of fragility:
|
|
Boolean indicating whether insertions at the start or end of the marked range should be interpreted as happening outside the marker. Defaults to |
Return values |
---|
Returns a DisplayMarker. |
Create a marker on this layer with its head at the given buffer position and no tail.
Argument | Description |
---|---|
|
|
|
optional
An Object with the following keys: |
|
optional
String Determines the rules by which changes to the buffer invalidate the marker. (default: ‘overlap’) It can be any of the following strategies, in order of fragility:
|
|
Boolean indicating whether insertions at the start or end of the marked range should be interpreted as happening outside the marker. Defaults to |
Return values |
---|
Returns a DisplayMarker. |
Find markers in the layer conforming to the given parameters.
This method finds markers based on the given properties. Markers can be associated with custom properties that will be compared with basic equality. In addition, there are several special properties that will be compared with the range of the markers rather than their properties.
Argument | Description |
---|---|
|
An Object containing properties that each returned marker must satisfy. Markers can be associated with custom properties, which are compared with basic equality. In addition, several reserved properties can be used to filter markers based on their current range: |
|
Only include markers starting at this Point in buffer coordinates. |
|
Only include markers ending at this Point in buffer coordinates. |
|
Only include markers starting at this Point in screen coordinates. |
|
Only include markers ending at this Point in screen coordinates. |
|
Only include markers starting inside this Range in buffer coordinates. |
|
Only include markers ending inside this Range in buffer coordinates. |
|
Only include markers starting inside this Range in screen coordinates. |
|
Only include markers ending inside this Range in screen coordinates. |
|
Only include markers starting at this row in buffer coordinates. |
|
Only include markers ending at this row in buffer coordinates. |
|
Only include markers starting at this row in screen coordinates. |
|
Only include markers ending at this row in screen coordinates. |
|
Only include markers intersecting this Array of |
|
Only include markers intersecting this Array of |
|
Only include markers containing this Range in buffer coordinates. |
|
Only include markers containing this Point in buffer coordinates. |
|
Only include markers contained in this Range in buffer coordinates. |
|
Only include markers contained in this Range in screen coordinates. |
|
Only include markers intersecting this Range in buffer coordinates. |
|
Only include markers intersecting this Range in screen coordinates. |
Return values |
---|
Returns an Array of DisplayMarkers |