How to extend the defaultHighlightStyle?

I want to add a TagStyle to the defaultHighlightStyle from @codemirror/language.

Looking at the styling documentation as well as the HighlightStyle API documentation the only way to do so seems to be copy all the tag styles from the defaultHighlightStyle into my code … which I’d like to avoid.

I think it would be nice if there was a way to extend the default highlighting style without needing to hard code its rules.

Would this patch help with this?

1 Like

Yes, thank you so much!