rainbow icon indicating copy to clipboard operation
rainbow copied to clipboard

Broken highlighting with ft=htmldjango

Open radimsuckr opened this issue 6 years ago • 4 comments

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.

radimsuckr avatar Sep 17 '18 20:09 radimsuckr

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

luochen1990 avatar Sep 18 '18 07:09 luochen1990

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

image

radimsuckr avatar Sep 19 '18 06:09 radimsuckr

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).

luochen1990 avatar Sep 20 '18 08:09 luochen1990

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.

radimsuckr avatar Sep 22 '18 11:09 radimsuckr