Vento
Highlighting for the Vento templating language
How to install
With Forge Super installed, the button above opens the app on this extension, where you press Install. Nothing is installed until you do.
You can also open the Extensions panel in the app and search for Vento. The extension's id is vento.
Don't have Forge Super yet? Download it here.
README
From the extension's repository, written by its authors and not by Mentenaz. See the source.
Zed-Vento
Adds support for the Vento template language to the Zed code editor.
Features
- Syntax highlighting for Vento template files (
.vto,.vento) - YAML front matter support with proper language injection
- HTML injection for template content
- JavaScript injection for code blocks
- Complete support for all Vento keywords and constructs
Supported Keywords
All Vento keywords are properly parsed and highlighted:
Control Flow
{{ if }}/{{ /if }}- Conditional blocks{{ else if }}- Else-if branches{{ else }}- Else branches{{ for }}/{{ /for }}- Loop blocks (with optionalawait)
Variables and Output
{{ set }}/{{ /set }}- Variable assignment (tag and block forms){{ echo }}- Output expressions
Layout and Composition
{{ layout }}/{{ /layout }}- Layout blocks{{ slot }}/{{ /slot }}- Slot definitions{{ default }}/{{ /default }}- Default content blocks{{ include }}- Include other templates{{ fragment }}/{{ /fragment }}- Fragment blocks (plugin)
Functions and Modules
{{ function }}/{{ /function }}- Function definitions (with optionalexport, includingexport async){{ import }}- Import from other templates{{ export }}/{{ /export }}- Export variables (tag and block forms)
Special Tags
{{> }}- JavaScript execution tag{{# #}}- Comment tag
Front Matter Support
This extension supports YAML front matter at the beginning of Vento templates:
---
title: My Page
date: 2024-01-01
tags:
- vento
- template
---
<h1>{{ title }}</h1>
The YAML content within the front matter delimiters (---) will be properly highlighted and treated as YAML.
Installation
Install the extension as usual for Zed.
From Source (Development)
- Clone this repository
- In Zed, open the command palette (
Cmd+Shift+Pon macOS,Ctrl+Shift+Pon Linux/Windows) - Run the command "zed: install dev extension"
- Select the cloned repository folder
About Vento
Vento is a fast and modern template engine for JavaScript. Learn more at vento.js.org.
License
MIT