Skip to content

Upstream-blocked: textDocument/documentSymbol merge from Isabelle/PIDE #89

Description

@Arthur742Ramos

The Isabelle 2025-2 isabelle vscode_server LSP does not advertise textDocument/documentSymbol capability, so VS Code's Outline view and breadcrumb bar fall back to the extension's local syntax-only document-symbol provider (src/semantic/documentSymbols.ts).

This is the last remaining upstream-blocked item on the M5 (semantic markup) milestone — see docs/ROADMAP_STATUS.md "Milestone 5 — Semantic markup" (status: ✅ 8 of 9).

Impact

  • The Outline view still works, but the local provider only sees what the conservative TypeScript-side parser extracts from .thy headers and command spans. It misses cross-file declarations, locale members, anonymous datatypes, and anything elaborated by Isabelle's own theory loader.
  • Workaround: open examples/Smoke.thy against the bundled Isabelle_VSCode_Smoke session — the local provider surfaces the three top-level definitions (conj_commute_smoke, add_zero_right_smoke, identity_smoke) which is enough for navigation in small theories.

Resolution paths (any one closes this)

  1. Upstream PR to isabelle vscode_server adding documentSymbolProvider capability + the corresponding textDocument/documentSymbol handler. Track via the Isabelle developer list.
  2. Scala backend PideBridge.documentSymbols(theoryUri) that walks the Headless Document.Snapshot and emits the structured symbol list ourselves, then surfaces it via a new JSON-RPC document/symbolsWithPide method consumed by a TS provider that merges with the existing local one. This is analogous to PR feat(backend): Phase 3a — PIDE snapshot extraction + per-(uri,version,session) cache #79's proofState/getWithPide for proof state. Cost: 1–2 PRs, similar surface area to Phase 3a.

The PideBridge route (option 2) is the realistic near-term path since we already own that bridge end-to-end. The upstream PR (option 1) would be cleaner but depends on Isabelle release cadence and reviewer bandwidth we don't control.

Acceptance criteria

This issue closes when EITHER:

  • The local document-symbol provider in src/semantic/documentSymbols.ts is supplemented by a PIDE-backed source that surfaces declarations elaborated by Isabelle's own loader (cross-file, locale members, etc.), OR
  • Upstream Isabelle ships an LSP build that advertises documentSymbolProvider and our existing IsabelleLanguageClient wiring picks it up without further work.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestupstream-blockedBlocked by an upstream dependency (e.g. Isabelle LSP surface)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions