luochen1990 / rainbow

Rainbow Parentheses Improved, shorter code, no level limit, smooth and fast, powerful configuration.
Apache License 2.0
1.79k stars 96 forks source link

Broken highlighting with ft=htmldjango #105

Open radimsuckr opened 6 years ago

radimsuckr commented 6 years ago

Describe the bug

Rainbow parentheses breaks the Django tags highlighting.

To Reproduce

Open any HTML file with Django template tags and make sure the filetype is set to htmldjango.

Expected behavior

Disable rainbow parentheses for Django tags completely as nested parentheses don't occur in them.

Screenshots

image

Additional context

Syntax highlighting works as expected when I explicitly turn off rainbow parentheses for given buffer.

luochen1990 commented 6 years ago

can you please provide a minimal complete example file which can reproduce your problem?

radimsuckr commented 6 years ago

The minimal example is as simple as {% extends "base.html" %}, which results into following screenshot.

image

luochen1990 commented 6 years ago

you can simply disable rainbow for this filetype. Or if you know about RegExp in Vim, you can define your parentheses for htmldjango files yourself (maybe you will need zero-width matching).

radimsuckr commented 6 years ago

Yeah, disabling it is an option, but I was hoping that maybe it'd be possible to have HTML rainbow parentheses combined with Django tags.