Closed systemmonkey42 closed 8 years ago
Thanks for the heads up. I use this plugin only for lisps and I don't really use folds, so I haven't run into the situation yet and not sure what would be the right solution. I just opened a C file and I can't seem to reproduce the issue.
My apologies. I have this in my vimrc
autocmd FileType vim,c,cpp let g:rainbow#pairs = [['(', ')'], ['[', ']'], ['{', '}']] | RainbowParentheses
The pair of curly braces at the end are the ones which broke c/c++ folding. If you use the default config, it doesn't override the curly braces, and doesn't break folding.
Unfortunately I've gotten to like being able to align my braces by color :-)
I will keep using a fork'd copy of rainbowparenthes with the added 'fold' option until I can suggest a better way, especially some way of detecting fold setting in existing syntax rules.
Cool.
This is breaking vim-go's syntax folding as well. Unfortunately, vim-go folds on raw parens in some cases, too, so even with the default rainbow settings the folds are all messed up for .go
files. :-/
I don't know enough vim-fu to propose a solution, either, but folding is of much higher utility for me than rainbow parens, so I'm going to stop using this plugin.
I must say, though, that I've appreciated it a great deal when working with other languages - thank you for providing it!
I do a ton of C development, and use folding fairly heavily.
When your rainbow_parentheses plugin is enable, vim report 'no fold found' when attempting to fold code.
It appears that the regions which are created using
simply override the regions defined in the syntax file;
Adding 'fold' to the end of the region command appears to have fixed this for now, but its a pretty naive solution.