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

[Bug] your g:rainbow_conf is broken #164

Closed alexzanderr closed 3 years ago

alexzanderr commented 3 years ago

i just pasted the

let g:rainbow_conf = {
\   'guifgs': ['royalblue3', 'darkorange3', 'seagreen3', 'firebrick'],
\   'ctermfgs': ['lightblue', 'lightyellow', 'lightcyan', 'lightmagenta'],
\   'guis': [''],
\   'cterms': [''],
\   'operators': '_,_',
\   'parentheses': ['start=/(/ end=/)/ fold', 'start=/\[/ end=/\]/ fold', 'start=/{/ end=/}/ fold'],
\   'separately': {
\       '*': {},
\       'markdown': {
\           'parentheses_options': 'containedin=markdownCode contained', "enable rainbow for code blocks only
\       },
\       'lisp': {
\           'guifgs': ['royalblue3', 'darkorange3', 'seagreen3', 'firebrick', 'darkorchid3'], "lisp needs more colors for parentheses :)
\       },
\       'haskell': {
\           'parentheses': ['start=/(/ end=/)/ fold', 'start=/\[/ end=/\]/ fold', 'start=/\v\{\ze[^-]/ end=/}/ fold'], "the haskell lang pragmas should be excluded
\       },
\       'vim': {
\           'parentheses_options': 'containedin=vimFuncBody', "enable rainbow inside vim function body
\       },
\       'perl': {
\           'syn_name_prefix': 'perlBlockFoldRainbow', "solve the [perl indent-depending-on-syntax problem](https://github.com/luochen1990/rainbow/issues/20)
\       },
\       'stylus': {
\           'parentheses': ['start=/{/ end=/}/ fold contains=@colorableGroup'], "[vim css color](https://github.com/ap/vim-css-color) compatibility
\       },
\       'css': 0, "disable this plugin for css files
\   }
\ }

into init.vim and it says at starup:

line 1834:
E720: Missing colon in Dictionary: lisp needs more colors for parentheses :)^I^I},^I^I'haskell': {^I^I^I'parentheses': ['start=/(/ end=/)/ fold', 'start=/\[/ en
d=/\]/ fold', 'start=/\v\{\ze[^-]/ end=/}/ fold'], "the haskell lang pragmas should be excluded^I^I},^I^I'vim': {^I^I^I'parentheses_options': 'containedin=vimFu
ncBody', "enable rainbow inside vim function body^I^I},^I^I'perl': {^I^I^I'syn_name_prefix': 'perlBlockFoldRainbow', "solve the [perl indent-depending-on-syntax
 problem](https://github.com/luochen1990/rainbow/issues/20)^I^I},^I^I'stylus': {^I^I^I'parentheses': ['start=/{/ end=/}/ fold contains=@colorableGroup'], "[vim
css color](https://github.com/ap/vim-css-color) compatibility^I^I},^I^I'css': 0, "disable this plugin for css files^I} }
E15: Invalid expression: {^I'guifgs': ['royalblue3', 'darkorange3', 'seagreen3', 'firebrick'],^I'ctermfgs': ['lightblue', 'lightyellow', 'lightcyan', 'lightmage
nta'],^I'guis': [''],^I'cterms': [''],^I'operators': '_,_',^I'parentheses': ['start=/(/ end=/)/ fold', 'start=/\[/ end=/\]/ fold', 'start=/{/ end=/}/ fold'],^I'
separately': {^I^I'*': {},^I^I'markdown': {^I^I^I'parentheses_options': 'containedin=markdownCode contained', "enable rainbow for code blocks only^I^I},^I^I'lis
p': {^I^I^I'guifgs': ['royalblue3', 'darkorange3', 'seagreen3', 'firebrick', 'darkorchid3'], "lisp needs more colors for parentheses :)^I^I},^I^I'haskell': {^I^
I^I'parentheses': ['start=/(/ end=/)/ fold', 'start=/\[/ end=/\]/ fold', 'start=/\v\{\ze[^-]/ end=/}/ fold'], "the haskell lang pragmas should be excluded^I^I},
^I^I'vim': {^I^I^I'parentheses_options': 'containedin=vimFuncBody', "enable rainbow inside vim function body^I^I},^I^I'perl': {^I^I^I'syn_name_prefix': 'perlBlo
ckFoldRainbow', "solve the [perl indent-depending-on-syntax problem](https://github.com/luochen1990/rainbo

it says there is a colon error, but i checked the syntax of this variable, its correct. but i guess the format is invalid, i dont really know.

i use neovim 0.5 btw and arch linux. the plugin works like a charm, its coloring the brackets.

but i want to custom colorize the brackets with my colors.

alexzanderr commented 3 years ago

UPDATE

i found the solution. the rainbow_conf from readme.md is broken. please update readme!

the one from autoload folder its fine, use that one if you wanna modify, not the one from readme.

star399 commented 7 months ago

Just delete the comment