kiss-vscode insert, insertAt functions
This commit is contained in:
@@ -28,6 +28,18 @@
|
||||
(document.getText range))
|
||||
""))
|
||||
|
||||
// TODO make an async annotation that throws an error if the promise is not wrapped in awaitLet or awaitBegin or returned by an async function?
|
||||
// but in some cases it doesn't matter and there are so many edge cases.
|
||||
(defun insertAt [:Position pos text]
|
||||
(.edit activeTextEditor
|
||||
(lambda [e]
|
||||
(e.insert pos text))))
|
||||
|
||||
(defun insert [text]
|
||||
// TODO this let is because identifier alias dot access is broken:
|
||||
(let [editor activeTextEditor]
|
||||
(insertAt editor.selection.active text)))
|
||||
|
||||
/**
|
||||
* State
|
||||
*/
|
||||
|
Reference in New Issue
Block a user