TEPL for VS Code
Syntax highlighting and formatting for TEPL (Tensor Equality Pattern Language), a language for writing tensor rewrite rules and operation dialects.
- Highlight
.tepl files, including rules, dialects, types, comments, attribute captures, and host functions.
- Format documents or automatically format when saving.
- Wrap long rewrites with configurable line width and indentation.
- Share formatting settings across a project with
tepl-format.json.

Get started
- Open a
.tepl file. The language indicator should say TEPL.
- Run Format Document from the Command Palette. If prompted, select TEPL as the formatter.
Requires VS Code 1.90 or newer. The parser and formatter are included with the extension.
Add this to your VS Code settings:
{
"[tepl]": {
"editor.defaultFormatter": "5yearsKim.tepl-vscode",
"editor.formatOnSave": true
}
}
The default line width is 80. Short rewrites stay on one line; longer rewrites put => on its own line and wrap expressions as needed. The formatter preserves comment text and literal spelling. Invalid or incomplete TEPL is left untouched.
Create tepl-format.json in your project to customize formatting:
{
"printWidth": 80,
"tabWidth": 4,
"useTabs": false,
"rewriteLayout": "auto"
}
All properties are optional. Set rewriteLayout to "multiline" to always put => on its own line. Project settings take precedence over editor settings.
For development setup, testing, packaging, CLI/library usage, and advanced configuration, see the developer guide.
See the changelog for release notes.