Skip to content

Commit 7b6e8ad

Browse files
committedDec 1, 2021
fix: Dashy files do not auto-activate the plugin
Fixes #293 Signed-off-by: Gordon Smith <[email protected]>
1 parent e05ae10 commit 7b6e8ad

File tree

4 files changed

+48
-15
lines changed

4 files changed

+48
-15
lines changed
 

‎.vscode/settings.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
},
1212
"editor.insertSpaces": true,
1313
"ecl.debugLogging": true,
14-
"ecl.launchConfiguration": "not found",
14+
"ecl.launchConfiguration": "localhost (user settings)",
1515
"ecl.targetCluster": {},
1616
"svg.preview.background": "black"
1717
}

‎package.json

+15-2
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,13 @@
110110
"activationEvents": [
111111
"onLanguage:ecl",
112112
"onNotebook:ecl-notebook",
113-
"onLanguage:kel"
113+
"onLanguage:kel",
114+
"workspaceContains:*.ecl",
115+
"workspaceContains:*.ecllib",
116+
"workspaceContains:*.mod",
117+
"workspaceContains:*.eclnb",
118+
"workspaceContains:*.kel",
119+
"workspaceContains:*.dashy"
114120
],
115121
"contributes": {
116122
"languages": [
@@ -164,6 +170,13 @@
164170
"language": "kel",
165171
"scopeName": "source.kel",
166172
"path": "./syntaxes/kel.tmLanguage.json"
173+
},
174+
{
175+
"scopeName": "source.json.dashy",
176+
"path": "./syntaxes/dashy.tmLanguage.json",
177+
"injectTo": [
178+
"source.json"
179+
]
167180
}
168181
],
169182
"snippets": [
@@ -1177,4 +1190,4 @@
11771190
}
11781191
]
11791192
}
1180-
}
1193+
}

‎syntaxes/dashy.tmLanguage.json

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"scopeName": "source.json.dashy",
3+
"fileTypes": [
4+
"dashy"
5+
],
6+
"name": "Dashy",
7+
"patterns": [
8+
{
9+
"include": "source.json"
10+
}
11+
]
12+
}

‎syntaxes/kel.tmLanguage.json

+20-12
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"kel"
55
],
66
"name": "KEL",
7-
"patterns": [{
7+
"patterns": [
8+
{
89
"include": "#expression"
910
},
1011
{
@@ -16,7 +17,8 @@
1617
"match": "\\b(?i:(%|\\*|\\+|-|/))\\b"
1718
},
1819
{
19-
"patterns": [{
20+
"patterns": [
21+
{
2022
"include": "#regions"
2123
},
2224
{
@@ -47,7 +49,6 @@
4749
"name": "entity.name.function.kel",
4850
"match": "\\b(?i:(fdc|filter|format|global|kelbase|kelquery|link|null|resources))\\b"
4951
},
50-
5152
"functionsEcl": {
5253
"name": "entity.name.function.ecl",
5354
"match": "\\b(?i:(abs|acos|asin|atan|atan2|cos|cosh|exists|exp|if|intformat|length|ln|log|map|power|realformat|round|roundup|sin|sinh|sqrt|tan|tanh|topn|trim|truncate))\\b"
@@ -62,7 +63,8 @@
6263
},
6364
"expression": {
6465
"name": "meta.expression.kel",
65-
"patterns": [{
66+
"patterns": [
67+
{
6668
"include": "#comment"
6769
},
6870
{
@@ -84,7 +86,8 @@
8486
},
8587
"comment": {
8688
"name": "comment.kel",
87-
"patterns": [{
89+
"patterns": [
90+
{
8891
"include": "#comment-block-doc"
8992
},
9093
{
@@ -111,25 +114,30 @@
111114
},
112115
"string": {
113116
"name": "string.kel",
114-
"patterns": [{
115-
"include": "#qstring-single"
116-
}]
117+
"patterns": [
118+
{
119+
"include": "#qstring-single"
120+
}
121+
]
117122
},
118123
"qstring-single": {
119124
"begin": "'",
120125
"end": "\\'|(?:[^\\\\\\n]$)",
121126
"name": "string.single.kel",
122-
"patterns": [{
123-
"include": "#string-character-escape"
124-
}]
127+
"patterns": [
128+
{
129+
"include": "#string-character-escape"
130+
}
131+
]
125132
},
126133
"string-character-escape": {
127134
"match": "\\\\(x\\h{2}|[0-2][0-7]{,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)",
128135
"name": "constant.character.escape.kel"
129136
},
130137
"literal": {
131138
"name": "literal.kel",
132-
"patterns": [{
139+
"patterns": [
140+
{
133141
"include": "#numeric-literal"
134142
},
135143
{

0 commit comments

Comments
 (0)