-
Notifications
You must be signed in to change notification settings - Fork 56
Description
Having folding in the syntax for *.rest would be useful as it'll make it much easier to organise requests in a worksheet. Initially I tried to manually create folds and save them via techniques like this: https://stackoverflow.com/questions/37552913/vim-how-to-keep-folds-on-save but inevitably as I modify requests and add new requests my folds end up broken because they're just created as line ranges.
If my vimscript-fu is up to the task I'll see if I can add some basic folding and contribute it, though I wonder the simplest approach is embedding other syntax formats, i.e. making it understand that the body is JSON, which would both add better syntax highlighting and solve the fold problem, as the JSON syntax knows how to fold JSON already. I've seen effective embedded syntaxes in https://github.com/xolox/vim-notes for example. Obviously one complication with that approach is that your body might not be JSON and you'd have to indicate content type in a way the syntax logic could understand, so just being able to fold the whole body would be a start.