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

Turning on rainbow breaks cmake syntax highlighting #77

Open
petersohn opened this issue May 20, 2017 · 4 comments
Open

Turning on rainbow breaks cmake syntax highlighting #77

petersohn opened this issue May 20, 2017 · 4 comments

Comments

@petersohn
Copy link

If there is a variable inside a string in cmake, then syntax highlighting is broken after that if rainbow is turned on. It happens with both the stock cmake highlighting and with nickhutchinson/vim-cmake-syntax. An example here:

screenshot_20170520_224131

It looks like everything is treated as string after that first line.

@SethArchambault
Copy link

Yeah I'm seeing this issue here javascript.

@bfrg
Copy link

bfrg commented Dec 17, 2017

I'm experiencing something similar. Vim's cmake syntax highlighting (no third-party) is almost completely broken.
As a quick workaround I just disable rainbow highlighting for cmake files:

augroup rainbow_off
    au!
    au FileType cmake RainbowToggleOff
augroup END

@luochen1990
Copy link
Owner

Maybe this is helpful: #93

@offa
Copy link

offa commented Jan 24, 2018

A workaround (as @luochen1990 already noted): Disable the rainbow plugin for CMake files.

let g:rainbow_conf = {
\   'separately': {
\       'cmake': 0,
\   }
\}

cincinnat pushed a commit to cincinnat/etc that referenced this issue Oct 25, 2018
The plugin breaks syntax highlighting for CMakeLists.txt:
    luochen1990/rainbow#77
wanghaiqiangk added a commit to wanghaiqiangk/Simple_Vimrc that referenced this issue Sep 22, 2024
Additionaly, the rainbow is disabled due to the problem of breaking
syntax highlighting, not just for cmake, but some other file types.
See pboettch/vim-cmake-syntax#5 and
luochen1990/rainbow#77
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants