Closed ctf0 closed 4 years ago
works for me. tho, you must apply the workspace edit, you makes no sense to await the new
-call. My working snippet looks like this
let file = vscode.Uri.file('/Users/jrieken/Code/_samples/devfest/issues/105378/test.txt')
let edit = new vscode.WorkspaceEdit()
edit.createFile(file)
edit.insert(file, new vscode.Position(0, 0), "test\n\ncreate new line\n\ninsert")
const success = await vscode.workspace.applyEdit(edit); // This is when it happens
console.log(success)
works for me. tho, you must apply the workspace edit, you makes no sense to await the new-call
i reinstalled vscode and it started working, so sorry for the inconvenience & many thanks for the tip 🏆
Steps to Reproduce:
Does this issue occur when all extensions are disabled?: Yes