gruvbox-community / gruvbox

Retro groove color scheme for Vim - community maintained edition
MIT License
801 stars 62 forks source link

XML looks silly since dd4114fdb4 #103

Closed dimbleby closed 5 years ago

dimbleby commented 5 years ago

image

The closing tags are a different colour than the opening tags, surely not what was intended?

I think you could make a case that this is a bug in the syntax rather the highlighter - but the vim xml syntax was last changed in 2013 so I suppose colour schemes will just have to work with it.

With the example above:

:echo synstack(4,3)
[364]
:echo synIDattr(364, "name")
xmlEndTag

That is, contents of the end tag are just xmlEndTag, where I guess you'd hoped that they would be xmlTagName

(On the opening tag we get [363, 365], which is xmlTag and xmlTagName.)

rbong commented 5 years ago

I have vim-polyglot installed which it turns out corrects this problem. The tag names are now also aqua on master, which should fix the problem. If you have vim-xml or vim-polyglot installed, you can achieve the old highlighting with:

autocmd ColorScheme gruvbox hi! link xmlTagName GruvboxBlue

It does seem to be a mistake in the highlighter since htmlEndTag means something different and the opening tag allows you to style the tag name and triangle braces separately. The author of vim-xml hasn't been able to get his changes merged in, let's see if I can't get them to fix this one thing.

rbong commented 5 years ago

I sent off a patch to the xml syntax maintainer. I'm going to open a new issue for using the new syntax behaviour if and when it becomes available.