Skip to content

Custom Rainbow Pairs breaks highlighting with Template literals in JSX with mxw/vim-jsx #22

@eedrah

Description

@eedrah

Issue:

The combination of mxw/vim-jsx and junegunn/rainbow_parentheses.vim, with a custom g:rainbow#pairs list, breaks syntax highlighting.

Minimal .vimrc to replicate:

set nocompatible
filetype indent plugin on
syntax on

call plug#begin($VIM_PLUGINS_DIR)
    Plug 'pangloss/vim-javascript'
    Plug 'mxw/vim-jsx'
    Plug 'junegunn/rainbow_parentheses.vim' " Breaks highlighting for template
call plug#end()
let g:jsx_ext_required = 0
let g:rainbow#pairs = [['(', ')'], ['[', ']'], ['{', '}'], ['<', '>']]

and then call the command :RainbowParentheses after, to toggle.

Temporary Solution

Disable the custom g:rainbow#pairs line.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions