Closed jvvv closed 2 months ago
Thanks for reaching out.
Scintillua distinguishes between tag "subclasses" using a .
. For example, <html>
is tagged as a 'tag'
(lexer.TAG
), but <img />
is tagged as a 'tag.single'
(lexer.TAG .. '.single'
). Unknown tags like <foo>
are tagged as 'tag.unknown'
. Editors can choose highlight these subclasses separately, or fall back onto the parent tag (in this case, lexer.TAG
, or 'tag'
).
Your solution suggests two things:
'tag.single'
tag and provide highlighting/styles for it like it does for just the 'tag'
tag.tag.single
-> tag
).If you update your theme and/or editor, you should get your desired behavior with no changes to Scintillua being necessary.
Thank you for your detailed analysis, it has be exceedingly helpful. Turns out that the main problem was that some tags are not added to the themes. After adding this comment, I will close and pursue this downstream. Thanks again.
Using vis, single html tags like hr, input, and meta (etc) aren't getting highlighted. My lua knowledge is pretty sparse, but here's a work-around that is working for me so far:
I'm running vis built from git HEAD on alpinelinux edge. I compared the html lexers in scintillua and vis, and they do not differ. Also, I submitted downstream issue with vis: https://github.com/martanne/vis/issues/1196 which may get closed since I was asked to upstream the issue.