From 43d4104cefa696ec5a08a5032b9ad93fbc2f5844 Mon Sep 17 00:00:00 2001 From: mwiegand Date: Sun, 17 May 2026 01:36:50 +0200 Subject: [PATCH] fix(spec): use legacy-modes/shell for bash language @codemirror/lang-bash is not an official package. cm6's official path to bash highlighting is @codemirror/legacy-modes/mode/shell wrapped in StreamLanguage.define(), matching the same mechanism we use for the custom srccfg mode. Co-Authored-By: Claude Opus 4.7 (1M context) --- docs/superpowers/specs/2026-05-17-textarea-editor-v2-design.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/superpowers/specs/2026-05-17-textarea-editor-v2-design.md b/docs/superpowers/specs/2026-05-17-textarea-editor-v2-design.md index c66db2d..50b8e21 100644 --- a/docs/superpowers/specs/2026-05-17-textarea-editor-v2-design.md +++ b/docs/superpowers/specs/2026-05-17-textarea-editor-v2-design.md @@ -144,7 +144,7 @@ swap back to overlay, etc.) only need to preserve this contract. | Language | Source | Notes | |---|---|---| | `srccfg` | `srccfg-mode.js` — `StreamLanguage.define(…)`, ~30 LOC | Tokens: comment `//…`, string `"…"`, number, keyword (`exec`, `alias`, `bind`), identifier. Linewise. Tied to `srccfg-vocab.json` for autocomplete. | -| `bash` | `@codemirror/lang-bash` | Stock package. | +| `bash` | `@codemirror/legacy-modes/mode/shell` via `StreamLanguage.define()` | Official cm6 port of the CodeMirror 5 shell mode. Same loading mechanism as `srccfg`. | | `auto` | Resolved on mount from filename input | `.cfg → srccfg`, `.sh → bash`, otherwise `plain`. Re-evaluated on filename input change while dropdown sits in "auto" state. | | `plain` | No language extension | Editor still mounts so the language `