luochen1990 / rainbow

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

Enable coloring from the 2nd occurrence of parenthesis, bracket etc? #74

Open ev-agelos opened 7 years ago

ev-agelos commented 7 years ago

My use case is that i only have 1 level of parenthesis, bracket etc in the file I am working on and I don't want your plugin to kick in yet

My colorscheme shows them white, but while using your plugin shows them blue which breaks the colorscheme so my suggestion would be to start coloring from the 2nd occurrence of parenthesis,bracket etc

(I hope it is not something else broke in my configs :|)

luochen1990 commented 7 years ago

In fact, I did a lot of work to make the first level of text highlighted ...

Maybe this should be provided as an option...

Hoping for some Pull Request to solve this problem :)

PS: this plugin allows you to disable it for specific filetype or enable it for specific filetype, hoping this can help you a little :)

ahmedelgabri commented 6 years ago

(Sorry for reviving an old thread) But I came here with the same issue & I was wondering if changing the patterns can help? I tried this but it doesn't work

'parentheses': ['start=/(/(/ end=/)/)/ fold', 'start=/\[/\[/ end=/\]/\]/ fold', 'start=/{/{/ end=/}/}/ fold'],
luochen1990 commented 6 years ago

If you just don't like the default color, you can config it yourself.

ahmedelgabri commented 6 years ago

If you just don't like the default color, you can config it yourself.

I know, but I'd like this to be handled by the colorscheme, any idea how to do this? otherwise I need to do this manually every time I change the colorscheme.

luochen1990 commented 6 years ago

Add the following to your vimrc, see readme.md for more details.

    let g:rainbow_conf = {
    \   'guifgs': ['white', 'darkorange3', 'seagreen3', 'firebrick'],
    \   'ctermfgs': ['white', 'lightyellow', 'lightcyan', 'lightmagenta'],
    \}