additionalTextEdit crash

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

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


1 Like

Has anyone else noticed this? This is rendering my completion extension useless. :frowning:

Thank you for the report! I’ve been able to confirm this with your example. We’ll look into getting this fixed soon.


Hey @logan, can you define “soon”, since this is a serious issue effecting my decision regarding nova?

The issue is fixed for our next bug fix update, which we hope to release sometime in the next week.