Zed extension for the Tera templating language.
Tip
For Visual Studio Code support, see uncenter/vscode-tera. For Helix and Neovim support, see uncenter/tree-sitter-tera.
Zed with zed-tera. Screenshot taken with the catppuccin/zed theme.
Open zed: extensions
in the command palette, and search for the "Tera" extension.
I suggest adding the following to either your user or project settings.json
to automatically apply injected language highlighting for Tera files with different extensions. Zed unfortunately does not allow extensions like this one set the language for files with multiple extensions1, so this is the best workaround for now.
{
"file_types": {
"Tera (CSS)": ["*.css.tera"],
"Tera (HTML)": ["*.html.tera"],
"Tera (JSON)": ["*.json.tera"],
"Tera (TOML)": ["*.toml.tera"],
"Tera (YAML)": ["*.yaml.tera"]
}
}
If you want all .tera
files to highlight surrounding content as HTML, you can add the following to your project or user config:
{
"file_types": {
"Tera (HTML)": ["tera"]
}
}
If you work in a project with multiple Tera templates with non-.tera
file extensions (such as .html
/.css
templates using Tera syntax), you can add something like the following to the .zed/settings.json
file in your project.
{
"file_types": {
"Tera (HTML)": ["html"]
}
}