vim-scala icon indicating copy to clipboard operation
vim-scala copied to clipboard

Plugin causes folds to not work properly.

Open Petesta opened this issue 9 years ago • 3 comments

I've been using the plugin since started using Scala and it is awesome, thanks for the work! Recently I started using Intellij for jumping into function definitions and noticed that the imports in the file are folded. So I've added a syn region foldImports start="import" end=/import.*\n^$/ fold keepend configuration to my .vimrc file to fold import statments. However I noticed that line of code did not work with vim-autoclose or vim-scala. When I removed the plugins the fold worked as expected. Here are examples of it not folding and folding. You can ignore the fold on the object in the first image.

Not folding. epplo

Folding screen shot 2016-01-03 at 2 17 59 pm

Petesta avatar Jan 03 '16 22:01 Petesta

I'm not sure what you're asking for here. You want imports to be folded by default?

derekwyatt avatar Jan 14 '16 00:01 derekwyatt

He added a custom line of config to get imports to fold automatically, but when vim-scala is active for scala filetype that custom syntax rule doesn't work. I can replicate that, but I'm not sure why it happens yet…

ches avatar Jan 14 '16 16:01 ches

Is there a way to turn off the folds created by vim-scala such that I'm able to use the custom definition to fold on imports?

@derekwyatt That was unclear, basically what @ches mentions above. When vim-scala is active the syntax rule I defined doesn't work properly.

Petesta avatar Jan 14 '16 19:01 Petesta