vim2hs
vim2hs copied to clipboard
Folding for individual cabal fields in Cabal files
Would it be possible to add folds for individual cabal fields? Some of them can get rather long, see e.g. https://github.com/haskell-suite/haskell-names/blob/master/haskell-names.cabal
Should be quite doable. In the vim-cabal part of the rewrite (#45) I'm already defining field values as syntax regions across lines, to make sure it's not confused by things like colons in description, say, and in theory in that implementation it should be a simple matter of setting the fold option on the region. However, syntax folding is slow and expensive (likely the primary reason people are reporting sluggishness from vim2hs) so I want to avoid that in the rewrite and use expression folding instead, but it shouldn't be too hard with that either.