Skip to content

Mordef/smarty-vscode-support

 
 

Repository files navigation

Smarty Template for Visual Studio Code

Latest Release Installs Rating GitHub closed issues

This extension provides Smarty Template support for Visual Studio Code. Supports {...} and {{...}} delimiters.

Features

  • Syntax highlighting
  • Snippet completion
  • Code formatting
  • Code folding
  • Comment toggling
  • Bracket autoclosing
  • Bracket autosurrounding
  • Hover documentation
  • Auto Indentation

What it looks like

Settings

Requirements

  • VS Code 1.43.0 or higher

Extension Settings

Settings

  • 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"
}

User Settings

For Emmet Abbreviations:

Paste the following into your settings.json

"emmet.includeLanguages": {
  "smarty": "html"
}

For Netbeans Style Theme:

Netbeans 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"
            }
        }
    ]
}

Known Issues

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.

Release Notes

Detailed release notes are available here.

Packages

No packages published

Languages

  • TypeScript 96.5%
  • JavaScript 2.2%
  • Other 1.3%