Skip to content

uncenter/zed-tera

Repository files navigation

zed-tera

Zed extension for the Tera templating language.

Tip

See also Tera extensions for other editors:

Screenshot of highlighted sample Tera code in Zed with the zed-tera extension installed

Zed with zed-tera. Screenshot taken with the catppuccin/zed theme.

Installation

  1. Open zed: extensions in the command palette (Cmd+Shift+X).
  2. Search for the "Tera" extension.
  3. Click install.

Usage

Embedded/injected language support

This extension automatically injects highlighting for "content" within Tera files based on the file extension. To highlight a Tera template for JSON, use the *.json.tera extension. Similarly, you can use *.css.tera, *.html.tera, *.toml.tera, and *.yaml.tera for CSS, HTML, TOML, and YAML respectively (please open an issue if you need support for another language).

Default to HTML highlighting of content

If you want all .tera files to highlight surrounding content as HTML (without having to use the .html.tera extension), you can add the following to your project or user config:

{
  "file_types": {
    "Tera (HTML)": ["tera"]
  }
}

Use a different file extension with Tera syntax highlighting

If you work in a project with Tera templates that don't use the .tera file extension (such as .html files using Tera syntax), consider adding the following to the .zed/settings.json file in your project.

{
  "file_types": {
    "Tera (HTML)": ["html"]
  }
}

This sets the file type for .html files to Tera (HTML), which will highlight the content as HTML.

License

MIT

About

⛩️ Zed extension for the Tera templating language.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published