Skip to content

Conversation

@Kha
Copy link
Member

@Kha Kha commented Jan 9, 2026

This PR adjusts the elaborator and language server so as not to rerun tactics when whitespace directly following them is changed, preventing loss of progress when starting to type the next tactic.

We do this by removing the trailing whitespace before passing a tactic from the tactic block elaborator to evalTactic. The language server then reconstructs trailing whitespace from outer snapshot/info tree nodes when necessary.

@Kha Kha added the changelog-server Language server, widgets, and IDE extensions label Jan 9, 2026
@Kha
Copy link
Member Author

Kha commented Jan 9, 2026

!bench

@leanprover-radar
Copy link

leanprover-radar commented Jan 9, 2026

Benchmark results for d23b858 against d92cdae are in! @Kha

Small changes (4🟥)
  • 🟥 build/module/Lean.Elab.Tactic.BuiltinTactic//instructions: +80.3M (+0.3%)
  • 🟥 build/module/Lean.Server.FileWorker.RequestHandling//instructions: +123.1M (+0.7%)
  • 🟥 build/module/Lean.Server.InfoUtils//instructions: +127.5M (+1.8%) (reduced significance based on *//lines)
  • 🟥 build/module/Lean.Server.Requests//instructions: +124.0M (+1.5%)

@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 Jan 9, 2026
leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Jan 9, 2026
@github-actions github-actions bot added the mathlib4-nightly-available A branch for this PR exists at leanprover-community/mathlib4-nightly-testing:lean-pr-testing-NNNN label Jan 9, 2026
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4-nightly-testing that referenced this pull request Jan 9, 2026
leanprover-bot added a commit to leanprover/reference-manual that referenced this pull request Jan 9, 2026
@leanprover-bot leanprover-bot added the builds-manual CI has verified that the Lean Language Reference builds against this PR label Jan 9, 2026
@leanprover-bot
Copy link
Collaborator

leanprover-bot commented Jan 9, 2026

Reference manual CI status:

@leanprover-community-bot leanprover-community-bot added the builds-mathlib CI has verified that Mathlib builds against this PR label Jan 10, 2026
@leanprover-community-bot
Copy link
Collaborator

Mathlib CI status (docs):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

builds-manual CI has verified that the Lean Language Reference builds against this PR builds-mathlib CI has verified that Mathlib builds against this PR changelog-server Language server, widgets, and IDE extensions mathlib4-nightly-available A branch for this PR exists at leanprover-community/mathlib4-nightly-testing:lean-pr-testing-NNNN 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.

4 participants