Struct lsp::types::TextEdit [−][src]
A text edit applicable to a text document.
Fields
range: Range
The range of the text document to be manipulated. To insert text into a document create a range where start === end.
new_text: String
The string to be inserted. For delete operations use an empty string.
Methods
impl TextEdit
[src]
impl TextEdit
The TextEdit namespace provides helper function to create replace, insert and delete edits more easily.
pub fn replace(range: Range, new_text: String) -> Self
[src]
pub fn replace(range: Range, new_text: String) -> Self
Creates a replace text edit. @param range The range of text to be replaced. @param newText The new text.
pub fn insert(position: Position, new_text: String) -> Self
[src]
pub fn insert(position: Position, new_text: String) -> Self
Creates a insert text edit. @param position The position to insert the text at. @param newText The text to be inserted.
pub fn delete(range: Range) -> Self
[src]
pub fn delete(range: Range) -> Self
Creates a delete text edit. @param range The range of text to be deleted.