Hello! Pretty sure I’ve found a fatal bug with the additionalTextEdits property in Nova 5. I’ve create a new completion extension from scratch, and added a simple TextEdit.insert(0, ‘bar’) to the completion item. Nova crashes instantly when committing the completion. Without the additionalTextEdits it works fine.
Heres the code to reproduce the issue:
exports.activate = function () {
// Do work when the extension is activated
console.log('active')
}
exports.deactivate = function () {
// Clean up state before the extension is deactivated
}
class CompletionProvider {
constructor() {}
provideCompletionItems(editor, context) {
// The text immediately preceding the cursor
let items = []
let item = new CompletionItem('foobar()', CompletionItemKind.Function)
item.documentation = 'Performs the foobar request.'
item.insertText = 'foobar(${0:args})'
item.additionalTextEdits = [TextEdit.insert(0, 'bar')]
items = [item]
return items
}
}
nova.assistants.registerCompletionAssistant('*', new CompletionProvider())
Should I report this bug somewhere else?
EDIT: Created a reproducible example here
Thanks!