swift.vim
swift.vim copied to clipboard
Add Code Folding Support
I just installed swift.vim in neovim 0.4.3. My swift files compile and run fine in Swift version 5.3-dev (LLVM 55d27a5828, Swift 6a5d84ec08).
But vim doesn't find any folds in my swift files. When I press one of the commands to open or close folds, such as zO
or zc
, I see the error E490: No fold found
. This is unusual. Most languages have code folding support in vim.
What is required to make this work?
This swift plugin for vim, which hasn't been updated since 2015, indicates that it supports code folding. I haven't created a language plugin for vim before, I'm looking through it to see where the folding support comes in. I can't imagine it would be much different from C++ code folding, but I'm also new to Swift.
Happy to accept PRs for this but I likely won't get to it