-
Notifications
You must be signed in to change notification settings - Fork 75
Conversation
related #165 |
@WalrusGumboot we are reaching a nice implementation, but unluckily I guess there is a bug when we simply use typst-lsp/src/server/symbols.rs Lines 34 to 56 in 4867da4
imo we should exclude them. Could you exclude these unrelated symbols? |
Oops, didn't test extensively enough 😅 I guess filtering for |
Hmm, yeah, that seems like more work than I've got time for at the moment. Maybe after the exam season. |
well, we may reserve this feature PR for you, @WalrusGumboot. You're free to reopen it later. |
When I find myself working on longer documents, I often enjoy maintaining a sense of structure by collapsing big blocks of the text at once. This PR adds some very basic functionality of doing so with folding ranges; it detects headings solely based on the '=' character. While this isn't ideal (something based on a syntactic analysis to fold all nodes that are a child of a certain heading would be more robust) it suits my personal needs well enough and might be worth considering.
A quick note on the behaviour
In a document like
folding ranges will be added as such:
instead of the hierarchical