Skip to content

✨ feat(mq-lsp): add folding range support#2014

Merged
harehare merged 1 commit into
mainfrom
feat/lsp-folding-range
Jul 14, 2026
Merged

✨ feat(mq-lsp): add folding range support#2014
harehare merged 1 commit into
mainfrom
feat/lsp-folding-range

Conversation

@harehare

Copy link
Copy Markdown
Owner

Summary

Implement textDocument/foldingRange, covering function/macro/module bodies, control-flow blocks (if/match/foreach/while/try), multi-line array/dict literals, and runs of consecutive comment lines.

Like signature_help.rs, this re-parses the document into a CST and walks it directly rather than going through mq_hir::Hir, since block delimiters aren't preserved in HIR symbol ranges.

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • ♻️ Refactor
  • 📝 Documentation
  • ⚡ Performance
  • ✅ Test
  • 📦 Build / dependencies
  • 👷 CI

Checklist

  • I ran cargo fmt and cargo clippy and addressed any warnings
  • I ran just test-all and all tests pass
  • I added or updated tests covering this change
  • I updated relevant documentation (/docs, crate README.md) if needed
  • I added a changelog entry if this is a user-facing change

Additional Context

Implement textDocument/foldingRange, covering function/macro/module
bodies, control-flow blocks (if/match/foreach/while/try), multi-line
array/dict literals, and runs of consecutive comment lines.

Like signature_help.rs, this re-parses the document into a CST and
walks it directly rather than going through mq_hir::Hir, since block
delimiters aren't preserved in HIR symbol ranges.
@harehare harehare merged commit 3ce6ada into main Jul 14, 2026
9 checks passed
@harehare harehare deleted the feat/lsp-folding-range branch July 14, 2026 13:15
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.

1 participant