A snippet edit represents an interactive edit that is performed by the editor.
Note that a snippet edit can always be performed as a normal {@link TextEdit text edit}. This will happen when no matching editor is open or when a {@link WorkspaceEdit workspace edit} contains snippet edits for multiple files. In that case only those that match the active editor will be performed as snippet edits and the others as normal text edits.
A snippet edit represents an interactive edit that is performed by the editor. *Note* that a snippet edit can always be performed as a normal {@link TextEdit text edit}. This will happen when no matching editor is open or when a {@link WorkspaceEdit workspace edit} contains snippet edits for multiple files. In that case only those that match the active editor will be performed as snippet edits and the others as normal text edits.
(insert position snippet)
Utility to create an insert snippet edit.
Parameters:
position
: Position
- A position, will become an empty range.snippet
: SnippetString
- A snippet string.Returns: SnippetTextEdit
- A new snippet edit object.
Utility to create an insert snippet edit. **Parameters:** - `position`: `Position` - A position, will become an empty range. - `snippet`: `SnippetString` - A snippet string. **Returns:** `SnippetTextEdit` - A new snippet edit object.
(range snippet-text-edit)
The range this edit applies to.
The range this edit applies to.
(replace range snippet)
Utility to create a replace snippet edit.
Parameters:
range
: Range
- A range.snippet
: SnippetString
- A snippet string.Returns: SnippetTextEdit
- A new snippet edit object.
Utility to create a replace snippet edit. **Parameters:** - `range`: `Range` - A range. - `snippet`: `SnippetString` - A snippet string. **Returns:** `SnippetTextEdit` - A new snippet edit object.
(set-range! snippet-text-edit value)
The range this edit applies to.
The range this edit applies to.
(set-snippet! snippet-text-edit value)
The {@link SnippetString snippet} this edit will perform.
The {@link SnippetString snippet} this edit will perform.
(snippet snippet-text-edit)
The {@link SnippetString snippet} this edit will perform.
The {@link SnippetString snippet} this edit will perform.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close