Overview Version History Q & A Rating & Review
Nette Latte + Neon for VS Code
Syntax highlighting, snippets, and tooling for the Latte template engine and Neon config format.
Features
🎨 Syntax highlighting — full grammar for .latte and .neon files
✂️ Snippets — blocks, loops, includes, forms, filters, n: attributes, and more
📐 Region folding — {* #region *} / {* #endregion *} support
⚡ Emmet — HTML Emmet completions work out of the box in .latte files
🔲 Bracket matching — { / } tag pairs highlighted automatically
💬 Comments — toggle comments with the standard Ctrl+/ shortcut
Installation
Snippets
Blocks & Templates
Prefix
Description
block
{block}…{/block}
define
{define}…{/define}
embed
{embed}…{/embed}
extends
{extends '…'}
import
{import '…'}
layout
{layout '…'}
capture
{capture $var}…{/capture}
include
{include #block}, block/file/from variants
snippet
{snippet}…{/snippet}
sandbox
{sandbox '…'}
try
{try}…{/try}
Loops & Conditionals
Prefix
Description
foreach
{foreach $items as $item}…{/foreach}
for
{for $i = 0; …}…{/for}
while
{while}…{/while}
iterateWhile
{iterateWhile}…{/while}
if
{if $cond}…{/if}
ifset
{ifset $var}…{/ifset}
ifchanged
{ifchanged}…{/ifchanged}
switch
{switch}…{/switch}
first / last / sep
iteration helpers
continueIf / breakIf / skipIf
loop flow control
Prefix
Description
form
{form}…{/form}
formPrint
{formPrint …}
input / label
form field tags
link / plink
{link …} / {plink …}
control
{control …}
Variables & Types
Prefix
Description
var
{var $name = '…'}
default
{default $var = '…'}
varPrint / varType
variable inspection / typing
parameters
{parameters …}
templateType / templatePrint
template class hints
Debugging & Utilities
Prefix
Description
dump
{dump $var}
debugbreak
{debugbreak $cond}
cache
{cache $var}…{/cache}
php
{php …}
contentType / status
HTTP helpers
syntax
{syntax mode}…{/syntax}
l / r
literal { / }
Filters
Prefix
Description
\|truncate \|substr \|trim
string trimming
\|replace \|replaceRE
string replacement
\|strip \|striptags
whitespace / HTML stripping
\|webalize \|toAscii
URL-friendly strings
\|indent \|padLeft \|padRight \|repeat
padding & indenting
\|implode \|nl2br
joining / line breaks
\|lower \|upper \|firstUpper \|capitalize
letter casing
\|date \|number \|bytes
formatting
\|url \|length \|sort \|reverse \|clamp \|null
misc
n: Attributes
Prefix
Description
n:class
conditional class binding
n:attr
generic attribute binding
n:foreach / n:inner-foreach
inline loop
n:href
presenter link
n:snippet
AJAX snippet
n:ifcontent / n:ifchanged / n:tag-if
conditional rendering
Configuration
Emmet is enabled automatically for .latte files — no manual setup needed. The extension sets emmet.includeLanguages via configurationDefaults in its manifest.
If you are on an older version of VS Code where configurationDefaults is not applied, add this manually to your settings.json:
"emmet.includeLanguages": { "latte": "html" }
Contributing
All contributions are welcome — bug reports, feature requests, and pull requests alike.
Open an issue or PR at github.com/kasik96/VS-Latte .
Credits
Grammar based on Nette-Latte-Neon-for-Sublime-Text-3 by Filip Stryk.
License
MIT — see LICENSE for details.