Skip to content
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

feat: support more foldable AST nodes #11

Merged
merged 1 commit into from
Mar 11, 2024

Conversation

Myriad-Dreamin
Copy link
Owner

Previous, they are:

  • content blocks, e.g. [ .. ]
  • code blocks, e.g. { .. }
  • heading elements, e.g. == Heading

This PR adds more markups to fold:

  • equations, e.g. $ .. $
  • raw blocks, e.g. ` .. `
  • block comments, e.g. /* .. */

This PR adds more expressions to fold:

  • parenthesized expression, e.g. ( 1 + 2 )
  • destructuring pattern, e.g. left side of (a, b) = (c, d)
  • argument list, e.g. the brace in f(a, b)
  • array, e.g. (c, d)
  • dictionary, e.g. (c: d)

@Myriad-Dreamin Myriad-Dreamin changed the title feat: support more AST nodes to folding feat: support more foldable AST nodes Mar 11, 2024
@Myriad-Dreamin Myriad-Dreamin linked an issue Mar 11, 2024 that may be closed by this pull request
@Myriad-Dreamin Myriad-Dreamin merged commit 3fe6197 into main Mar 11, 2024
11 checks passed
@Myriad-Dreamin Myriad-Dreamin deleted the markup-expression-folding branch March 11, 2024 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

VSCode extension: Fold ranges delimited by parentheses
1 participant