Add custom tags to html CompletionSource

I would like to add custom VueJS components tags in the html autocompletion, but I don’t know how to access the html schema object. In cm5 I could just add my custom tags to the object CodeMirror.htmlSchema with their specific attributes and it was working but I can’t find a way to achieve the same thing with cm6.

As I’m here, I’d like also to understand if there is an easy way to trigger the attributes list opening while writing html after using the character :.
In VueJS custom or classic html attributes can use a variable for setting their value, and in this case the attribute is preceded by :.

In cm5 I had doubled each attribute in order to have a version of each with : but that’s the ugly way.

Thanks for your help

This patch adds options to do something like this. Completing attributes that start with a colon should already just work.

Thank you, I have been able to add extra tags using your patch.

However, completing attributes starting with a colon work neither on our custom tags’ attributes nor on the embedded attributes.
If I add the colon, I don’t see any completion, while if I don’t, I see them normally.

Are the attributes defined with colons? Or are you expecting normal attributes to complete even if you add a colon in front of them?

The colon indicates if the value is a variable and must be therefore evaluated.
So, in VueJS, any attribute (normal and custom alike) can be prefixed by a colon.

Yeah, that’s not something that this completer is going to support.