This extension provides Smarty Template support for Visual Studio Code.
Supports {...}
and {{...}}
delimiters.
- Syntax highlighting
- Snippet completion
- Code formatting
- Code folding
- Comment toggling
- Bracket autoclosing
- Bracket autosurrounding
- Hover documentation
- Auto Indentation
- VS Code
1.43.0
or higher
smarty.highlight
: Enable/disable highlight decoration of smarty tags documents.smarty.highlightColor
: Highlight decoration color based on dark/light theme kind.
For example:
"smarty.highhlight": true,
"smarty.highlightColor": {
"dark": "#FFFFFF25",
"light": "#FFFA0040"
}
For Emmet Abbreviations:
Paste the following into your settings.json
"emmet.includeLanguages": {
"smarty": "html"
}
For Netbeans Style Theme:
Paste the following into your settings.json
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": [
"punctuation.section.embedded.begin.smarty",
"punctuation.section.embedded.end.smarty"
],
"settings": {
"foreground": "#FFA500",
"fontStyle": "bold"
}
},
{
"scope": [
"keyword.control.smarty",
"support.function.built-in.smarty"
],
"settings": {
"foreground": "#16A016",
"fontStyle": "bold"
}
},
{
"scope": ["variable.parameter.smarty"],
"settings": {
"foreground": "#AE23A3",
"fontStyle": "bold"
}
},
{
"scope": ["source.smarty"],
"settings": {
"foreground": "#D17C32"
}
}
]
}
Due to the formatter is HTML based, code formatting applies only to HTML/CSS/JS
of document.
Submit the issues if you find any bug or have any suggestion.
Detailed release notes are available here.