Skip to content

feat: server-side for trace search - #10365

Merged
mhuisi merged 1 commit into
leanprover:masterfrom
mhuisi:mhuisi/trace-queries
Sep 17, 2025
Merged

mhuisi merged 1 commit into
leanprover:masterfrom
mhuisi:mhuisi/trace-queries

Conversation

@mhuisi

@mhuisi mhuisi commented Sep 12, 2025 •

Copy link
Copy Markdown
Contributor

This PR implements the server-side for a new trace search mechanism in the InfoView.

Demo:
Search demo

@mhuisi
mhuisi requested a review from Vtec234 as a code owner September 12, 2025 16:34
@mhuisi mhuisi added the changelog-server Language server, widgets, and IDE extensions label Sep 12, 2025
@github-actions github-actions Bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Sep 12, 2025
@ghost

ghost commented Sep 12, 2025

Copy link
Copy Markdown

Mathlib CI status (docs):

  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 3f7f1c87f6bb360437b01e9ad009a97d05e45e47 --onto b64111d5a837bb5273978cf9945bb137a31777b7. You can force Mathlib CI using the force-mathlib-ci label. (2025-09-12 17:34:19)

@leanprover-bot

Copy link
Copy Markdown
Collaborator

Reference manual CI status:

  • ❗ Reference manual CI will not be attempted unless your PR branches off the nightly-with-manual branch. Try git rebase 3f7f1c87f6bb360437b01e9ad009a97d05e45e47 --onto d3dda9f6d4428a906c096067ecb75e432afc4615. You can force reference manual CI using the force-manual-ci label. (2025-09-12 17:34:21)

@mhuisi
mhuisi added this pull request to the merge queue Sep 17, 2025
Merged via the queue into leanprover:master with commit d625aaa Sep 17, 2025
Julian added a commit to Julian/lean.nvim that referenced this pull request Apr 4, 2026
Implement the client side of leanprover/lean4#10365, matching
leanprover/vscode-lean4#658.

When the cursor is on a trace diagnostic in the infoview,
<LocalLeader>/ prompts for a search query. The server's
Lean.Widget.highlightMatches RPC highlights matching text and
uncollapses matching traces. An empty query restores the original.

New types (HighlightedInteractiveCode, TaggedTextHighlightedMsgEmbed)
properly model the server's HighlightedSubexprInfo and
HighlightedMsgEmbed without polluting the existing rendering path.
The trace rendering logic is extracted into a shared render_trace
function parameterized by its recursive renderer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog-server Language server, widgets, and IDE extensions toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants