Text::Xslate for Visual Studio Code
Syntax highlighting support for Text::Xslate template files in Visual Studio Code.
Features
- Enhanced Syntax Highlighting: Complete support for Text::Xslate Kolon syntax
- HTML Integration: Full HTML language support with embedded template directives
- Attribute Expression Support: Xslate expressions work inside HTML attributes (class, src, href, etc.)
- Comment Support: Proper highlighting for
<:# comment syntax
- Template Features: Support for expressions, control structures, filters, and all Xslate constructs
Supported Syntax
<: if $condition :>
<p>Content here</p>
<: end :>
Line Directives
: for $items -> $item {
<li><: $item.name :></li>
: }
Expressions
<p>Hello, <: $name :>!</p>
<p>Escaped: <: $html | html :></p>
<img src="<: $image_url :>" alt="<: $image.alt_text :>">
<div class="<: $user.is_admin ? 'admin' : 'user' :>">Content</div>
Control Structures
if / elsif / else / end
for / while
block / override
include / cascade
macro
<:# This is a comment :>
<p>Visible content</p>
File Extensions
This extension activates for files with the following extensions:
Installation
From Marketplace
Search for "Text::Xslate" in the VS Code Extensions view (Ctrl+Shift+X or Cmd+Shift+X).
From VSIX
- Download the
.vsix file from the releases page
- Run
code --install-extension text-xslate-0.9.0.vsix
Requirements
No additional requirements or dependencies.
Extension Settings
This extension does not add any VS Code settings.
Known Issues
Please report issues on the GitHub repository.
Release Notes
See CHANGELOG.md for release notes.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT License - see LICENSE for details.