Skip to content
Open
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
38 changes: 38 additions & 0 deletions .github/workflows/zed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# The Zed extension (tooling/zed-rx): the extension builds for the target Zed loads, and its queries run on the
# grammar extension.toml pins. A query naming a node that grammar does not have stops Zed loading the language.
name: zed

on:
push:
branches: [main]
paths: ["tooling/zed-rx/**", "examples/*.rx", ".github/workflows/zed.yml"]
pull_request:
paths: ["tooling/zed-rx/**", "examples/*.rx", ".github/workflows/zed.yml"]
workflow_dispatch:

jobs:
extension:
runs-on: ubuntu-latest
defaults:
run:
working-directory: tooling/zed-rx
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-wasip2
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
with:
workspaces: tooling/zed-rx
- run: cargo fmt --check
- run: cargo clippy --release --target wasm32-wasip2 -- -D warnings
- run: cargo build --release --target wasm32-wasip2
- uses: pnpm/action-setup@v4
with:
version: 11.1.1 # as editor.yml
- uses: actions/setup-node@v5
with:
node-version: 22
- name: Queries, on the pinned grammar
run: ./check-queries.sh
9 changes: 6 additions & 3 deletions tooling/rx-language-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ vim.lsp.config("rx", {
vim.lsp.enable("rx")
```

Neovim has no `.rx` grammar yet; the server's semantic tokens color names.
For highlighting, install the tree-sitter grammar in
[`../tree-sitter-rx`](../tree-sitter-rx) as the parser for `reactivescript`;
without it, the server's semantic tokens color names.

**Helix**, in `languages.toml`:

Expand All @@ -98,8 +100,9 @@ language server with the command
map the file name pattern `*.rx` to it, and add the `tooling/vscode-rx`
folder under Settings › Editor › TextMate Bundles for highlighting.

**Zed** needs an extension of its own (a Zed extension declares the language
and starts the server); there isn't one yet.
**Zed**: the extension in [`../zed-rx`](../zed-rx), which installs this server
from npm and highlights with the tree-sitter grammar in
[`../tree-sitter-rx`](../tree-sitter-rx).

The `/path/to/reactivescript` paths are a checkout of this repository; with
the npm package, the command is `npx @reactivescript/language-server --stdio`
Expand Down
3 changes: 3 additions & 0 deletions tooling/zed-rx/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
target/
*.wasm
grammars/
Loading
Loading