XML autoCloseTags and attribute highlighting

I’m looking at porting a codemirror which was using v5 into v6, however there are some differences I noticed.

The biggest is that there is nothing to replace the closeTag plugin for XML.
The HTML autoClose extension is very similar, however that only applied to the defined HTML tags. I was looking for something to autoclose any well structured XML.

Another minor difference I noticed is that attribute names are not given any highlighting

Checking the source for the default highlighter, any propertyName tag definition should be given a particular colour, I am not sure why this doesn’t apply to XML attributes.
My current workaround is to define a custom highlight scheme for XML, though it would be nice if the default covered this.

This patch add support for tag closing to lang-xml.

You’re reading that wrong. That only assigns a style to property definitions.

Thanks for adding the auto-closing tag feature!

I guess the XML grammar is not ‘defining’ attribute names, which is why the highlighting isn’t added by default. I’ll create a custom highlighter for it then.

They are definitely in the syntax tree, tagged with tags.attributeName, but that tag isn’t highlighted specially by the default highlighter.