VS Code extension
Syntax highlighting, comments, bracket closing and folding for .janel files.
janelkit-vscode Syntax highlighting for .janel files in Visual Studio Code. code --install-extension janelkit.janelkit-janelWhat it does
A .janel file mixes three languages, and the extension colors each one as such: Python in the script, in {expressions} and in the {#if}, {#each}, {#key} and {#hidden} blocks; CSS in style; and the template, with its on:, bind:, class: and transition: directives highlighted.
It also adds <!-- --> comments with Ctrl+/, automatic closing of brackets, parentheses and quotes, and folding of script, style and {#…} blocks. The code on this website is colored with the same grammar.
Install it
Search for JanelKit in the Extensions view of VS Code, or install it from a terminal. VS Code 1.80 or newer is required. The extension does not install JanelKit; to run applications you still need pip install janelkit.
code --install-extension janelkit.janelkit-janel
# Or build it from the repository (requires Node.js):
cd packages/janelkit-vscode
npx @vscode/vsce package
code --install-extension janelkit-janel-0.1.0.vsixCopyErrors are reported by janel, not by the editor
The extension only colors code: it does not complete names or mark errors. Run janel dev or janel build to see errors with file, line, column and suggestions; in the integrated terminal of VS Code you can click a location to jump to it. Editors and tools can also call janelkit.compiler.check_file to get the same diagnostics without running anything.
Learn moreCLI and tooling ↗
English documentation based on the JanelKit source. For additional details, browse the source docs ↗.