From 4a6a01f217bfc02e73d3bb731c8e252b0bc269c6 Mon Sep 17 00:00:00 2001 From: Lachlan Heywood Date: Mon, 4 Mar 2019 15:18:13 -0500 Subject: [PATCH] Added scope --- CHANGELOG.md | 4 ++++ package.json | 18 ++++++++++++------ syntaxes/perch.tmLanguage.json | 26 ++++++++++++++------------ 3 files changed, 30 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 84b833f..5e99904 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log All notable changes to the "perch-language-support" extension will be documented in this file. +## 1.0.1 +- Added support for `text.html.derivative` scope. +- Corrected support for js scope blocks. Linter still gets confused, though. + ## 1.0.0 - Initial release diff --git a/package.json b/package.json index b7acf7a..45a9140 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "perch-language-support", "displayName": "Perch Language Support", "description": "Language Support for the Perch CMS Template files", - "version": "1.0.0", + "version": "1.0.1", "publisher": "lachieh", "engines": { "vscode": "^1.25.0" @@ -36,10 +36,16 @@ "color": "#9fc7dd" }, "contributes": { - "grammars": [{ - "scopeName": "text.html.perch", - "injectTo": [ "text.html.basic" ], - "path": "./syntaxes/perch.tmLanguage.json" - }] + "grammars": [ + { + "scopeName": "text.html.perch", + "injectTo": [ + "text.html.basic", + "text.html.derivative", + "source.js" + ], + "path": "./syntaxes/perch.tmLanguage.json" + } + ] } } diff --git a/syntaxes/perch.tmLanguage.json b/syntaxes/perch.tmLanguage.json index 8889128..93d213d 100644 --- a/syntaxes/perch.tmLanguage.json +++ b/syntaxes/perch.tmLanguage.json @@ -1,10 +1,10 @@ { - "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", - "name": "Perch Template", - "injectionSelector": "L:text.html.basic, source.js", + "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", + "name": "Perch Template", + "injectionSelector": "L:text.html.basic, L:text.html.derivative, L:source.js", "scopeName": "text.html.perch", - "patterns": [ - { + "patterns": [ + { "name": "source.perch", "begin": "(