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
9 changes: 9 additions & 0 deletions tooling/zed-rx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,12 @@ default:
```json
{ "languages": { "ReactiveScript": { "semantic_tokens": "combined" } } }
```

Zed draws a semantic token over the grammar's colour. TypeScript calls a source
and an equation both a read-only variable, so the server marks them `source`
and `equation`, and `languages/reactivescript/semantic_token_rules.json` gives
those the colours `highlights.scm` gives their declarations: a source is
`variable.special`, an equation `constant`. With them on, every read of a
source or an equation has its colour, not only its declaration (and a source's
writes). The server on npm (0.3.1) does not mark them yet: with it, both show
as a plain `variable`, declarations too.
12 changes: 12 additions & 0 deletions tooling/zed-rx/languages/reactivescript/semantic_token_rules.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[
{
"token_type": "variable",
"token_modifiers": ["source"],
"style": ["variable.special"]
},
{
"token_type": "variable",
"token_modifiers": ["equation"],
"style": ["constant"]
}
]
Loading