Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions docs/ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ For shipped milestones and tag-by-tag release history, see [CHANGELOG.md](../CHA

### v0.6.x follow-ups

- **Investigate lit-aware highlighting for `// RUN:` lines.** MLIR / PDLL / TableGen tests commonly use LLVM lit `RUN:` directives, but those directives are not plain bash: they support lit substitutions (`%s`, `%t`, `%{...}`, `%(line)`), continuations, and test-suite-specific tool substitution. Explore whether `highlights.scm` / `injections.scm` can highlight command-like structure without misrepresenting lit syntax as generic shell. Prefer explicit lit substitution captures and only inject `shellscript` into command spans if it behaves correctly on real LLVM / MLIR tests.
- **Investigate lit-aware runnables for tests.** Zed `runnables.scm` can surface runnable syntax, but executing a single `RUN:` line correctly requires lit substitution and test-suite configuration, not just passing the comment payload to a shell. Start with a runnable for the whole current lit test file (for example, `llvm-lit $ZED_FILE`) and evaluate whether a small lit-aware helper is needed before exposing individual `RUN:` pipelines.
- **Highlight & query polish across the three languages.** Work the concrete queue from the 0.6.x query review: PDLL user-constraint references in type position, declaration/tuple parameter names, operation-attribute keys, and call-target capture consistency; TableGen string/code delimiter policy and optional `include` outline entries; MLIR outline coverage for `#`/`!` alias definitions and external resources (pending grammar-side `name:` fields for aliases). Further edge cases join this queue as they surface.
- **TableGen `[{ ... }]` auto-close and matching.** The merged `[{` / `}]` code-block tokens are not declared as a bracket pair. Test a config-only entry first (`{ start = "[{", end = "}]", close = true, newline = true }`); only pursue a grammar change that exposes queryable open/close nodes if Zed cannot match a multi-character pair.
- **Query smoke tests against the pinned grammars.** Suite CI checks the Rust extension but never compiles `languages/*/*.scm` against the exact grammar SHAs in `extension.toml`, so a grammar bump can leave a stale node name unnoticed. Add a gate that compiles every query and parses representative fixtures for all three languages.
- **Verify include navigation end-to-end.** PDLL and TableGen servers return `documentLink` for includes, while go-to-definition on the include itself may legitimately return nothing; TableGen cross-file definition jumps also had rough edges in earlier manual testing. Re-test with a correct compilation database / `extra_dirs`, capture the protocol traffic, and isolate whether a failure comes from symbol lookup, the returned URI/range, or Zed's rendering before changing anything.
- **Document a lit workflow instead of building lit-aware features.** Running the current lit test from Zed needs only a user-defined task such as `llvm-lit $ZED_FILE`; add a README recipe rather than extension code. Per-`RUN:`-line highlighting and runnables stay out of near-term scope and are tracked under [Ideas](#ideas-unscored).
- ~~**Verify MLIR-in-C++ raw strings.** Zed's bundled C++ grammar already injects `raw_string_content` using the delimiter as `@injection.language`. Since this extension registers `mlir`, the injection should "just work" inside `R"mlir(…)mlir"`, but it has not been confirmed end-to-end. Verify with a real `.cpp` file and document the result; if the wiring is missing, file an upstream issue.~~
- **Continued highlight & query polish.** Steady, focused improvements across the three grammars and capability files as edge cases surface.

## Mid-term

Expand All @@ -31,6 +33,7 @@ For shipped milestones and tag-by-tag release history, see [CHANGELOG.md](../CHA

## Ideas (unscored)

- Lit-aware `// RUN:` highlighting and per-line runnables. Demoted from v0.6.x: comments are single tokens in all three grammars, so faithfully highlighting lit substitutions (`%s`, `%t`, `%{...}`) would require a dedicated tree-sitter lit grammar injected into comment content — injecting generic `shellscript` misrepresents lit syntax — and executing a single `RUN:` line requires lit substitution plus test-suite configuration. A documented whole-file `llvm-lit $ZED_FILE` task covers the practical workflow in the meantime; revisit only if a maintained lit grammar appears or user demand justifies owning one.
- Code-lens-style links from a PDLL `Pattern` to the TableGen op definition it rewrites, pending a suitable Zed extension API surface. First verify what `mlir-pdll-lsp-server` already provides via go-to-definition.
- Quick-fix for "missing `include`" in TableGen (auto-insert the canonical header path), most likely as an upstream `tblgen-lsp-server` code action rather than a Zed-only feature.
- Dialect-aware highlighting inside MLIR string attributes that embed recognized DSLs. Keep this opt-in / whitelist-driven so ordinary MLIR string attributes are not over-highlighted.
Expand Down
Loading