Skip to content

Commit

Permalink
Added scope
Browse files Browse the repository at this point in the history
  • Loading branch information
lachieh committed Mar 4, 2019
1 parent 751dca0 commit 4a6a01f
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 18 deletions.
4 changes: 4 additions & 0 deletions 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
18 changes: 12 additions & 6 deletions package.json
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
}
]
}
}
26 changes: 14 additions & 12 deletions 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": "(</?perch:)([A-Za-z-]+)",
"beginCaptures": {
Expand All @@ -27,8 +27,8 @@
}
]
}
],
"repository": {
],
"repository": {
"entities": {
"patterns": [
{
Expand Down Expand Up @@ -90,10 +90,12 @@
]
},
"tag-generic-attribute": {
"patterns": [{
"match": "(?<=[^=])\\b([a-zA-Z0-9:-]+)",
"name": "entity.other.attribute-name.html.perch"
}]
"patterns": [
{
"match": "(?<=[^=])\\b([a-zA-Z0-9:-]+)",
"name": "entity.other.attribute-name.html.perch"
}
]
},
"tag-id-attribute": {
"begin": "\\b(id)\\b\\s*(=)",
Expand Down Expand Up @@ -194,5 +196,5 @@
}
]
}
}
}
}

0 comments on commit 4a6a01f

Please sign in to comment.