Fragaria
Fragaria copied to clipboard
code folding support
How difficult it is to add code folding support in fragaria?
Implementing the folding itself is not particularly difficult. How to do it is covered in depth by an old WWDC session. Even though they store the folding ranges in the text storage (which is not really a great option if you support multiple text boxes having the same text storage like Fragaria does), it's not very difficult to store the folded ranges elsewhere.
On the other hand, detecting interesting folding ranges (like all blocks bounded by {}) is going to be hard because the current parsing code is totally inadequate for this purpose.