Skip to content

feat(snapshot): add document symbols and folding support#764

Open
Gehbt wants to merge 3 commits intovitest-dev:mainfrom
Gehbt:symbol-n-folding
Open

feat(snapshot): add document symbols and folding support#764
Gehbt wants to merge 3 commits intovitest-dev:mainfrom
Gehbt:symbol-n-folding

Conversation

@Gehbt
Copy link

@Gehbt Gehbt commented Mar 19, 2026

Document symbol support

image

Folding range support
image

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds VS Code language features (document symbols + folding ranges) for vitest-snapshot files in the extension, alongside a couple of small maintenance updates.

Changes:

  • Introduce snapshot parsing utilities and wire up DocumentSymbolProvider + FoldingRangeProvider for vitest-snapshot.
  • Fix typos in the logging API (openOutput, exists).
  • Update Vitest e2e global setup typing and add a snapshot fixture file for testing/demo.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
test/e2e/utils/downloadSetup.ts Updates Vitest globalSetup context typing used by e2e setup.
samples/basic/test/snap/fixture.test.ts.snap Adds a .snap fixture used to exercise snapshot parsing/symbols/folding.
packages/extension/src/snapshot/tools.ts Implements snapshot entry extraction + symbol-building helpers.
packages/extension/src/snapshot/foldingRangeProvider.ts Provides folding ranges for each snapshot entry.
packages/extension/src/snapshot/documentSymbolProvider.ts Provides Outline symbols grouped by snapshot “breadcrumb” segments.
packages/extension/src/log.ts Fixes typos in the log API method/variable names.
packages/extension/src/extension.ts Registers the new snapshot symbol and folding providers.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants