Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XML looks silly since dd4114fdb4 #103

Closed
dimbleby opened this issue Jun 8, 2019 · 2 comments
Closed

XML looks silly since dd4114fdb4 #103

dimbleby opened this issue Jun 8, 2019 · 2 comments

Comments

@dimbleby
Copy link

dimbleby commented Jun 8, 2019

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 added a commit that referenced this issue Jun 8, 2019
@rbong
Copy link

rbong commented Jun 8, 2019

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
Copy link

rbong commented Jun 8, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants