Extension API for Code Actions

Now that Nova 2 native supports language server code actions, I think there’s a use case to allow other extensions to use the same interface. My ESLint extension supports auto-fix suggestions, but I’m currently using the showChoicePalette UI which is a little more clunky.

I recently received this feedback - <link ommitted because the forum won’t let me post it - issue 56 in the apexskier/nova-eslint github repo>, where someone actually expected to see auto-fix suggestions in the code action UI, and was confused by ones they saw that I think came from the typescript extension’s language server.

I’d really like to see this implemented as a new assistant provided by the AssistantsRegistry similar to the completion assistant.

interface CodeActionAssistant {
    provideCodeActions(editor, context);
}

I’d like to be able to specify a “preferred” code action like in the language server protocol. ESLint has a “primary” fix and a list of secondary suggestions.

1 Like

We are definitely planning on doing this! Work on this front just didn’t make the Nova 2 schedule.

2 Likes

Any updates on this feature?

1 Like

Currently still on our list!

1 Like

This ESLint feature is currently the only thing I miss from VSCode.