-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for syntax-based folding #191
Conversation
Regions, comment blocks, and heredocs can now be folded. Additionally, region names are now searchable using ctrl-r.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Syntax based folding is one of the possibly more tricky ones, which may easily cause trouble if syntax is not accurate.
I've added some notes about known limitations.
Maybe we can considder adding punctuation.section.group
and punctuation.section.braces
as well, if they are scoped well enough (pairs can be found).
@deathaxe Thank you for your help. I've incorporated your suggestions into the latest commit. Groups and braces are folded correctly from what I've seen. |
0c2ed8f
to
9ecdc80
Compare
This prevents strings that are not heredocs from being foldable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good already. Maybe some advices to be better then C# ;)
Co-authored-by: deathaxe <deathaxe82@googlemail.com>
Thank you, both! |
Thank you @michaelblyons and @deathaxe for helping me with these contributions! |
Regions, comment blocks, and heredocs can now be folded. Additionally, region names are now searchable using ctrl-r.