TextEdit
A TextEdit
describes a single change that may be applied to a TextEditor. An array of TextEdit
objects represent a set of changes that may be applied together atomically. TextEdit
objects are most often used with APIs such as CompletionItem to describe set of edits to apply.
Added in Nova 2
Static Methods
delete(range)
Returns a new text edit that deletes text in the Range range
.
insert(position, newText)
Returns a new text edit that inserts text at position.
replace(range, newText)
Returns a new text edit that replaces the Range range
with newText
.
Class Methods
constructor(range, newText)
Creates a new text edit that replaces the Range range
with newText
.
Properties
newText
A String
that will be inserted when the text edit is applied.
range
The Range that will be replaced when the edit is applied.