Tau Language for VS Code
Syntax highlighting and editor tooling for .tau templates - the template language used by
Steno. Language reference: Tau syntax spec.
Features
- Syntax highlighting - HTML base grammar plus Tau's control tags (
{#if} / {#each} /
{#let}), interpolations, filters, {@html} / {@include} / {@children}, and <Component>
tags.
- Bracket/indent awareness - matching and auto-close for
{ }, tag-aware indent rules.
- Snippets -
#if, #if-else, #each, #each-index, #each-else, #let, @html,
@include, @children, #comment.
- Language server
- Diagnostics: unbalanced
{#if} / {#each} blocks, stray {:else} / {:else if},
unclosed/mismatched <Component> tags, use of an identifier Tau's expression evaluator
always rejects (constructor, eval, __proto__, ...).
- Completion: built-in filters after
|, control-tag snippets after {.
- Hover: documentation for built-in filters (
date, truncate, upper, lower, url).
The diagnostics are a structural linter, not the canonical Tau parser (that parser is internal to
@steno/steno and not published as a public subpath import). It won't catch every render-time
error - deep expression-grammar validation and cross-file component/include resolution are out of
scope for v1 - but it never requires running your project's Deno toolchain to give you feedback.
Development
npm install
npm run build # bundle client + server into dist/
npm run watch # rebuild on change
npm run typecheck
npm test # runs server/test against server/src
Then, in VS Code, F5 (Run Extension) launches an Extension Development Host with this extension
loaded.
Packaging
npx @vscode/vsce package
License
MIT
| |