ET Language for VS Code
This extension recognizes .et files, adds syntax and semantic highlighting,
and gives ET files an alien-head icon. It covers the core ET statements,
Arduino sketch targets such as board uno_r4_minima, library calls, timing,
and ML statements. Colors depend on your VS Code theme and its semantic
highlighting setting. A file icon theme can override the ET file icon.
The extension is an editor companion. To compile and upload ET projects,
follow the ET installation and Arduino instructions.
Install
Once published, search for ET Language in the VS Code Extensions view and
select Install. If you have a .vsix file, use Extensions: Install from
VSIX... in the Command Palette. Open any .et file to activate highlighting.
Work efficiently
Keep the ET compiler project open beside your .et files. Start from an
example, set the
target board, and run cargo run -- path/to/program.et from the project root.
For repeated compiles, build once with cargo build --release and run the
release executable after editing. For Arduino sketch targets, verify and
upload the generated .ino with Arduino IDE or Arduino CLI.
Develop this extension
To try the extension without packaging it, first change to the repository root.
Then open a VS Code extension development window:
cd /path/to/et_lang
code --new-window --extensionDevelopmentPath="$PWD/vscode-et" "$PWD"
The Explorer root should be et_lang, and opening examples/blink.et should
show et in the language mode at the bottom right. If it says Plain Text,
check that both paths in the command point to the repository root and its
vscode-et directory.
To package it locally, use vsce and install the resulting VSIX:
cd vscode-et
npx @vscode/vsce package
code --install-extension et-lang-0.1.0.vsix
Run the semantic analyzer checks with node --test from this directory. Colors
depend on the active VS Code theme and its semantic highlighting setting.