From 22744dd15b0889d2c20aece0178a8859adf8d7c6 Mon Sep 17 00:00:00 2001 From: Stefan Kopco Date: Sun, 22 Nov 2026 12:02:24 +0100 Subject: [PATCH 1/2] zed-rx: rx-tsc tasks (type-check, watch) from the extension's tasks.json --- tooling/zed-rx/README.md | 11 +++++++++++ .../zed-rx/languages/reactivescript/tasks.json | 16 ++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 tooling/zed-rx/languages/reactivescript/tasks.json diff --git a/tooling/zed-rx/README.md b/tooling/zed-rx/README.md index 1cf8ebc4..560f25ec 100644 --- a/tooling/zed-rx/README.md +++ b/tooling/zed-rx/README.md @@ -59,6 +59,17 @@ and see `` appear; a `/** */` comment and a `//` comment keep their own colours; `css` and `styled` templates are highlighted as CSS; the outline lists components, sources and equations. +## Tasks + +The extension adds two tasks, offered in **task: spawn** while a `.rx` file is +active: `rx-tsc: type-check project` and its `--watch` variant. Each runs +`npx --no-install rx-tsc --noEmit` in the worktree root. The extension's own +copy of the server is not on the project's path, so the project needs +`@reactivescript/language-server` in its `devDependencies` (`--no-install` +fails instead of fetching anything) and a `tsconfig.json` whose `include` +names the `.rx` files. See +[Type-checking from the command line](../rx-language-server/README.md#type-checking-from-the-command-line). + ## Settings All under `lsp.rx-language-server` in Zed's `settings.json`: diff --git a/tooling/zed-rx/languages/reactivescript/tasks.json b/tooling/zed-rx/languages/reactivescript/tasks.json new file mode 100644 index 00000000..b4c95d6b --- /dev/null +++ b/tooling/zed-rx/languages/reactivescript/tasks.json @@ -0,0 +1,16 @@ +[ + { + "label": "rx-tsc: type-check project", + "command": "npx", + "args": ["--no-install", "rx-tsc", "--noEmit"], + "cwd": "$ZED_WORKTREE_ROOT", + "reveal": "always" + }, + { + "label": "rx-tsc: type-check project (watch)", + "command": "npx", + "args": ["--no-install", "rx-tsc", "--noEmit", "--watch"], + "cwd": "$ZED_WORKTREE_ROOT", + "use_new_terminal": true + } +] From 9736a3373742bc4659e52f3523a0ff7fa7ad83c2 Mon Sep 17 00:00:00 2001 From: Stefan Kopco Date: Sun, 22 Nov 2026 13:14:45 +0100 Subject: [PATCH 2/2] zed-rx: tasks use npx --no, and the README says what they need --- tooling/zed-rx/README.md | 30 ++++++++++++------- .../languages/reactivescript/tasks.json | 7 ++--- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/tooling/zed-rx/README.md b/tooling/zed-rx/README.md index 560f25ec..77ca4e4d 100644 --- a/tooling/zed-rx/README.md +++ b/tooling/zed-rx/README.md @@ -59,17 +59,6 @@ and see `` appear; a `/** */` comment and a `//` comment keep their own colours; `css` and `styled` templates are highlighted as CSS; the outline lists components, sources and equations. -## Tasks - -The extension adds two tasks, offered in **task: spawn** while a `.rx` file is -active: `rx-tsc: type-check project` and its `--watch` variant. Each runs -`npx --no-install rx-tsc --noEmit` in the worktree root. The extension's own -copy of the server is not on the project's path, so the project needs -`@reactivescript/language-server` in its `devDependencies` (`--no-install` -fails instead of fetching anything) and a `tsconfig.json` whose `include` -names the `.rx` files. See -[Type-checking from the command line](../rx-language-server/README.md#type-checking-from-the-command-line). - ## Settings All under `lsp.rx-language-server` in Zed's `settings.json`: @@ -124,3 +113,22 @@ default: ```json { "languages": { "ReactiveScript": { "semantic_tokens": "combined" } } } ``` + +## Tasks + +The extension adds two tasks, offered in **task: spawn** while a `.rx` file is +active: `rx-tsc: type-check project` and its `--watch` variant. Each runs +`npx --no rx-tsc --noEmit` in the worktree root. `--no` installs nothing; +without the package, npm reports a 404 for `rx-tsc`. + +Requirements: + +- `node` and `npx` on the `PATH` (tasks do not use Zed's Node). +- `@reactivescript/language-server` installed in the project, so that + `node_modules/.bin/rx-tsc` exists at the worktree root. The extension's own + copy is not on the project's path. Yarn PnP, and a package that only lives + in a sub-package of a monorepo, are not covered. +- A `tsconfig.json` whose `include` names the `.rx` files. + +See +[Type-checking from the command line](../rx-language-server/README.md#type-checking-from-the-command-line). diff --git a/tooling/zed-rx/languages/reactivescript/tasks.json b/tooling/zed-rx/languages/reactivescript/tasks.json index b4c95d6b..e70ee1f6 100644 --- a/tooling/zed-rx/languages/reactivescript/tasks.json +++ b/tooling/zed-rx/languages/reactivescript/tasks.json @@ -2,14 +2,13 @@ { "label": "rx-tsc: type-check project", "command": "npx", - "args": ["--no-install", "rx-tsc", "--noEmit"], - "cwd": "$ZED_WORKTREE_ROOT", - "reveal": "always" + "args": ["--no", "rx-tsc", "--noEmit"], + "cwd": "$ZED_WORKTREE_ROOT" }, { "label": "rx-tsc: type-check project (watch)", "command": "npx", - "args": ["--no-install", "rx-tsc", "--noEmit", "--watch"], + "args": ["--no", "rx-tsc", "--noEmit", "--watch"], "cwd": "$ZED_WORKTREE_ROOT", "use_new_terminal": true }