├── .gitattributes ├── .gitignore ├── .vscode └── launch.json ├── .vscodeignore ├── CHANGELOG.md ├── LICENSE ├── README.md ├── language-configuration.json ├── package.json └── syntaxes └── eta.json /.gitattributes: -------------------------------------------------------------------------------- 1 | # Set default behavior to automatically normalize line endings. 2 | * text=auto 3 | 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | *.vsix -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | // A launch configuration that launches the extension inside a new window 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | { 6 | "version": "0.2.0", 7 | "configurations": [ 8 | { 9 | "name": "Extension", 10 | "type": "extensionHost", 11 | "request": "launch", 12 | "args": [ 13 | "--extensionDevelopmentPath=${workspaceFolder}" 14 | ] 15 | } 16 | ] 17 | } -------------------------------------------------------------------------------- /.vscodeignore: -------------------------------------------------------------------------------- 1 | .vscode/** 2 | .vscode-test/** 3 | .gitignore 4 | vsc-extension-quickstart.md 5 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | All notable changes to the "eta-vscode" extension will be documented in this file. 4 | 5 | Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file. 6 | 7 | ## [Unreleased] 8 | 9 | - Initial release -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | MIT License 3 | 4 | Copyright (c) 2020 shadowtime2000 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software ,and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # eta-vscode 2 | 3 | > VSCode language support for the Eta templating engine. 4 | 5 | [![](https://img.shields.io/visual-studio-marketplace/d/shadowtime2000.eta-vscode)](https://marketplace.visualstudio.com/items?itemName=shadowtime2000.eta-vscode) 6 | 7 | 16 | 17 | ## Features 18 | 19 | * Syntax highlighting for Eta 20 | * Usage of delimiters inside of embedded Javascript (`console.log("%>")`) 21 | * Whitespace delimiting (`-` or `_`) 22 | * Raw tags (`<%~`) 23 | 24 | 27 | 28 | ## Usage 29 | 30 | Open `settings.json` Visual Studio Code configuration file and add this lines: 31 | ```json 32 | "files.associations": { 33 | "*.eta": "eta" 34 | }, 35 | "emmet.includeLanguages": { 36 | "eta": "eta" 37 | } 38 | ``` 39 | 40 | ## Release Notes 41 | 42 | ### 1.0.0 43 | 44 | Initial release of this extension. 45 | 46 | 62 | -------------------------------------------------------------------------------- /language-configuration.json: -------------------------------------------------------------------------------- 1 | { 2 | "comments": { 3 | "blockComment": [ "<% /*", "*/ %>" ] 4 | }, 5 | // symbols used as brackets 6 | "brackets": [ 7 | ["<%", "%>"] 8 | ], 9 | // symbols that are auto closed when typing 10 | "autoClosingPairs": [ 11 | ["<%", "%>"] 12 | ], 13 | // symbols that can be used to surround a selection 14 | "surroundingPairs": [ 15 | ["<", ">"], 16 | ["(", ")"], 17 | ["{", "}"], 18 | ["[", "]"] 19 | ] 20 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "eta-vscode", 3 | "displayName": "eta-vscode", 4 | "description": "Language support for the Eta templating language", 5 | "version": "1.0.0", 6 | "engines": { 7 | "vscode": "^1.50.0" 8 | }, 9 | "categories": [ 10 | "Programming Languages" 11 | ], 12 | "contributes": { 13 | "languages": [{ 14 | "id": "eta", 15 | "aliases": ["Eta", "eta"], 16 | "extensions": [".eta"], 17 | "configuration": "./language-configuration.json" 18 | }], 19 | "grammars": [{ 20 | "language": "eta", 21 | "scopeName": "source.eta", 22 | "path": "./syntaxes/eta.json", 23 | "injectTo": [ 24 | "text.html" 25 | ], 26 | "embeddedLanguages": { 27 | "meta.embedded.block.eta": "eta", 28 | "meta.embedded.block.javascript": "source.js" 29 | }, 30 | "tokenTypes": { 31 | "meta.embedded.block.javascript": "other" 32 | } 33 | }] 34 | }, 35 | "publisher": "shadowtime2000", 36 | "repository": { 37 | "type": "git", 38 | "url": "https://github.com/shadowtime2000/eta-vscode" 39 | } 40 | } -------------------------------------------------------------------------------- /syntaxes/eta.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Eta", 3 | "patterns": [ 4 | { 5 | "include": "#keywords" 6 | } 7 | ], 8 | "injectionSelector": "L:text.html", 9 | "repository": { 10 | "keywords": { 11 | "patterns": [ 12 | { 13 | "name": "keyword.control", 14 | "begin": "(<%[-_]?\\s*?(~|=)?)", 15 | "end": "([-_]?%>)", 16 | "contentName": "meta.embedded.block.javascript", 17 | "patterns": [ 18 | { 19 | "include": "source.js" 20 | } 21 | ] 22 | }, 23 | { 24 | "name": "html.eta", 25 | "include": "text.html.derivative" 26 | } 27 | ] 28 | } 29 | }, 30 | "scopeName": "source.eta" 31 | } --------------------------------------------------------------------------------