Support folding ranges inside a line
See original GitHub issueHey, I have read through the folding-related issues (like #3422, the linked ones and some other ones related to the FoldingRangeProvider
API specifically), but I don’t seem to have come across a conversation about inline folding ranges.
Has this been discussed - or is it okay to start a discussion on the topic now?
I am interested in these, because I’d like to improve readability of MarkDown documents (using an extension) by collapsing MarkDown link targets (the URLs - which can be quite long) and instead linkifying the text range (using a DocumentLinkProvider
).
Researching the FoldingRange
API though, I can see it only has start and end lines, not Position
s. Is this an immutable deliberate design decision or something open to alternative with enough support behind it?
I think other possible use cases could be folding of ternary expression branches, one-liner if
statements and stuff like that. (But I’m mostly interested in my use-case described above.)
Issue Analytics
- State:
- Created 5 years ago
- Reactions:76
- Comments:18 (3 by maintainers)
We currently have no plans for inline foldings. It would require some major work on the editor widget side.
This would enable some Really Awesome language aware functionality. 🔥 Here are some examples.