Skip to content
Draft
Show file tree
Hide file tree
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
19 changes: 19 additions & 0 deletions tooling/zed-rx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,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).
15 changes: 15 additions & 0 deletions tooling/zed-rx/languages/reactivescript/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[
{
"label": "rx-tsc: type-check project",
"command": "npx",
"args": ["--no", "rx-tsc", "--noEmit"],
"cwd": "$ZED_WORKTREE_ROOT"
},
{
"label": "rx-tsc: type-check project (watch)",
"command": "npx",
"args": ["--no", "rx-tsc", "--noEmit", "--watch"],
"cwd": "$ZED_WORKTREE_ROOT",
"use_new_terminal": true
}
]
Loading