IDE Extensions
The Jig extension provides syntax highlighting for .jig template files with full support for embedded language blocks. It is available for VS Code and compatible editors.
Installation
Install from the VS Code Marketplace or click a button below to install directly in your editor:
Or install from the command line:
code --install-extension svallory.jig
Features
- Syntax highlighting for Jig tags (
@if,@each,@component, etc.), mustache expressions ({{ }}), and comments ({{-- --}}) - Host language highlighting — each file extension (
.html.jig,.ts.jig,.py.jig, etc.) activates the appropriate host language grammar - Embedded language blocks via the content type suffix
- Emmet support in
.jigand.html.jigfiles
Supported Languages
The extension ships grammars for the following host languages. Use the file extension for file-level highlighting or the embed identifiers with the : LANG suffix for inline embedded blocks.
| Language | File Extension | Embed Identifiers |
|---|---|---|
| HTML | .jig, .html.jig | html |
| CSS | .css.jig | css |
| JavaScript | .js.jig | js, javascript, es6 |
| TypeScript | .ts.jig | ts, typescript |
| JSON | .json.jig | json |
| JSX | .jsx.jig | jsx |
| TSX | .tsx.jig | tsx |
| C | .c.jig | c |
| C++ | .cpp.jig, .h.jig | cpp, c++, cxx |
| C# | .cs.jig | csharp, c#, cs |
| Dart | .dart.jig | dart |
| Dockerfile | .dockerfile.jig | dockerfile |
| F# | .fs.jig | fsharp |
| Go | .go.jig | go, golang |
| Java | .java.jig | java |
| Julia | .jl.jig | julia, jl |
| Less | .less.jig | less |
| Markdown | .md.jig | markdown, md |
| YAML | .yml.jig, .yaml.jig | yaml, yml |
| PHP | .php.jig | php |
| PowerShell | .ps1.jig | powershell, ps1, pwsh |
| Python | .py.jig | python, py |
| R | .r.jig | r |
| Ruby | .rb.jig | ruby, rb |
| Rust | .rs.jig | rust, rs |
| SCSS | .scss.jig | scss |
| Shell | .sh.jig | shell, sh, bash, zsh |
| SQL | .sql.jig | sql |
| Swift | .swift.jig | swift |
| XML | .xml.jig | xml |
| Lua | .lua.jig | lua |
| Perl | .pl.jig | perl, pl |
| Groovy | .groovy.jig | groovy |
| Batch | .bat.jig | bat, batch, cmd |
| Clojure | .clj.jig | clojure, clj |
| CoffeeScript | .coffee.jig | coffee, coffeescript |
| Diff | .diff.jig | diff |
| Makefile | Makefile.jig | makefile |
| Objective-C | .m.jig | objc, objective-c |
| Objective-C++ | .mm.jig | objcpp, objective-cpp |
| ShaderLab | .shader.jig | shaderlab |
| Visual Basic | .vb.jig | vb |
| XSL | .xsl.jig | xsl |
| Elixir | .ex.jig, .exs.jig | elixir |
| Embedded Elixir | .eex.jig, .leex.jig | eex |
| HTML EEX | .html.eex.jig, .html.leex.jig | html-eex |
Embedded Language Blocks
Use the content type suffix (: LANG) on any block-level tag to get syntax highlighting for the tag's body:
@if(format === 'json'): json
{
"name": {{ name }},
"version": {{ version }}
}
@end
@each(query in queries): sql
SELECT * FROM {{ query.table }}
WHERE id = {{ query.id }};
@end
The identifier after : must match one of the embed identifiers from the table above. Jig expressions ({{ }}) and tags (@tag) inside the block are still highlighted as Jig syntax.
Configuration
Template Disks
Configure template lookup paths in your project's Jig configuration:
jig.mount('default', join(__dirname, 'views'))
Emmet
Emmet is enabled by default for .jig and .html.jig files. If it's not working, add this to your settings.json:
{
"emmet.includeLanguages": {
"jig-html": "html"
}
}