Repository navigation
Conversation
oddcelot
force-pushed
the
tree-sitter-rx
branch
from
November 19, 2026 08:59
c1134ec to
42dfbc5
Compare
5 tasks done
Every comment was handed to the JSDoc grammar, so a // line came out as JSDoc description text, and its words lost the comment colour up to the first comma or full stop.
…th as Zed runs it Zed starts lsp.rx-language-server.binary.path itself and never asks the extension for a command, so the branch that read it was dead: no --stdio, no Node for a .js file, no RXC. The README now shows the settings that work. A failed npm install no longer stops a server that is already on disk, and an install whose bin/server.js is missing is installed again.
…ns, ' closes The type_arguments and type_parameters patterns sat before the operator list, which also has < and >, and the later pattern wins.
With the language taken from the tag's capture and injection.combined, Zed's JSX tag auto-close did nothing anywhere in a .rx file, even where no template matched. One pattern per tag, the language named, as in Zed's own TSX injections, brings it back; css`…` still highlights.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi! This adds a Zed extension for
.rxand.d.rxintooling/zed-rx. It builds on the tree-sitter grammar from solidjs#88 and closes the gap the language server README mentions: "Zed needs an extension of its own; there isn't one yet".What you get
@reactivescript/language-serverfrom npm and keeps it updated. The compiler ships in it as WebAssembly, so there is nothing to build per platform.fns, actions, sources, equations, contexts, errors and types.<style>blocks are CSS, andrxcode fences in Markdown are highlighted.Highlighting in
examples/todos.rxsource failures,todos[i].done := …@variable.speciallive = …,shown = …@constant:=@keyword.operatorMarkup inside exported components and control blocks is highlighted too. That is the case solidjs#86 fixed for the TextMate grammar.
Settings
All optional, under
lsp.rx-language-serverin Zed'ssettings.json. They mirror the three VS Code settings.binary.pathsettings.rxc.pathrxcbinary in place of the WebAssembly buildsettings.typescript.tsdklibfoldernode_modules/typescript/lib, else the server's ownExample
{ "lsp": { "rx-language-server": { "binary": { "path": "/path/to/reactivescript/tooling/rx-language-server/bin/server.js" }, "settings": { "rxc": { "path": "/path/to/reactivescript/compiler/target/release/rxc" }, "typescript": { "tsdk": "/path/to/project/node_modules/typescript/lib" } } } } }Notes for review
revinextension.tomlpoints atb470614, the squash commit of tree-sitter-rx: a tree-sitter grammar for .rx solidjs/reactivescript#88. A grammar change needs this line bumped to reach Zed.node_moduleshoisted to a parent folder has to setsettings.typescript.tsdk..rxgrammar yet", which stopped being true with tree-sitter-rx: a tree-sitter grammar for .rx solidjs/reactivescript#88.Testing
cargo build --release --target wasm32-wasip2,cargo clippyandcargo fmt --checkare cleantree-sitter queryon four example files with no errorsbin/server.jswhere the extension starts itexamples/shopandexamples/todos.rxNot included
rx-tsczed-industries/extensions