xolox / vim-easytags

Automated tag file generation and syntax highlighting of tags in Vim
http://peterodding.com/code/vim/easytags/
1.01k stars 109 forks source link

when HighlightTags kicks in ruby highlighting is lost #108

Open Garonenur opened 9 years ago

Garonenur commented 9 years ago

Hi,

I just discovered that when HighlightTags starts its magic in a ruby file that I lose a lot of syntax highlighting. Basicaly only some keywords are highligted and the elements that are recognized as tags. But everything else looks the same. Before using easytags strings had a different colour, and string interpolation was distinctly coloured also. Any Idea why this might be, or can you tell me which information you need? See these for what my problem is: with easytags screenshot from 2015-01-22 19 33 03 without easytags screenshot from 2015-01-22 19 37 26

xolox commented 9 years ago

Can you attach or link to a Ruby file that can be used to reproduce the issue? Vim's syntax highlighting engine is kind of a mess and it's indeed possible for vim-easytags dynamic tag highlighting to break the regular syntax mode (it's very hard if not impossible to avoid these kinds of interactions).

I've seen this before (e.g. dynamic syntax highlighting of Bash function names breaks syntax based folding in shell scripts) but I don't know of a generic way to debug this. I have a small (unreleased) plug-in that gives me popups about the name of syntax items when I hover over them with my mouse cursor, so what I basically do is look back up for the first "broken" syntax item, then finding the definition of that syntax item in the syntax script and figuring out the "unfortunate interaction" between the syntax mode and vim-easytags.