Selector Bug in registerCompletionAssistant


I am not sure if I am doing something wrong or there is a problem with Nova.

It is an issue I have with AlpineJS extension, So I have these snippets that get loaded on as CompletionItem. These are HTML snippets like tags etc such a script tag for the CDN. As basic as that.

The extension checks and sees if the cursor is in any context (selector = none), if not it will provide the snippets. The reason that it shows when not in any context is that inside HTML tags we have no selector, which is fine and it works:

Problem comes when we use it in other syntaxes such as php, in PHP files, which is were alpine is supposed to be used. But the extension should only work in the HTML syntax and not inside php. Now this works until we back space. As shown below if I type Alpine nothing happens.

But as soon as I backspace/delete Nova picks none as selector inside php syntax.

This is not limited to the php syntax, even in the HTML, when we backspace to empty string it wrongfully selects none for selector for example in picture below, it should be not none.

I did not see any API to actually target and select the syntax rather than the selector. Adjusting the selector to remove php or blade from the the selectors[] in registerCompletionAssistant did broke the extension for the php files, even though I left the html in the selectors[], the extension stopped working all together in php files.

I presumed that the selectors[] targets the syntax popped up in the inspector and should not relate to the file extension? correct me if it targets something else.

Removing the syntax from the Activation Event in the extension json did nothing. I dont even understand the difference between the activation event and the selector in the CompletionAssistant :man_shrugging:.