summaryrefslogtreecommitdiff
path: root/editors/vscode/README.md
blob: e7db36dd476de439f57e396a12004210fd23cd12 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# ISA Syntax Highlighting for VS Code

Highlights `.isa` definition files — block types, keys, hex values, comments, bit ranges, and booleans.

## Install

```bash
# Symlink into your VS Code extensions folder
mkdir -p ~/.vscode/extensions
ln -sf "$PWD" ~/.vscode/extensions/myisa-isa-syntax
```

Or copy the folder:

```bash
cp -r "$PWD" ~/.vscode/extensions/myisa-isa-syntax
```

Then **reload VS Code** (`Cmd+Shift+P` → "Developer: Reload Window").

Open any `.isa` file — syntax highlighting activates automatically.

## Colors by token

| Token | Color |
|-------|-------|
| `ARCH`, `FORMAT`, `REGISTER`, `INSTRUCTION`, `CSR` | Keyword purple |
| Block name (e.g. `ADD`, `x0`, `R`) | Entity/type blue-green |
| `END` | Keyword purple |
| Keys (`NAME`, `OPCODE`, `DESC`, etc.) | Property orange/yellow |
| `0x...` hex values | Numeric green |
| `31:25` bit ranges | Numeric green |
| `true`/`false` booleans | Language constant |
| `#` comments | Comment gray |