Skip to content

Commit 97c864d

Browse files
committed
Fix scope syntax highlighting
Fix the overly broad scope configuration that causes the extension to affect non-semantic syntax coloring across all languages. #160
1 parent d595390 commit 97c864d

File tree

2 files changed

+34
-36
lines changed

2 files changed

+34
-36
lines changed

package.json

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -80,82 +80,82 @@
8080
"[*Light*]": {
8181
"textMateRules": [
8282
{
83-
"scope": "comment",
83+
"scope": "comment.documentation.block.juvix, comment.line.double-dash.juvix",
8484
"settings": {
8585
"foreground": "#a8a8a8",
8686
"fontStyle": "italic"
8787
}
8888
},
8989
{
90-
"scope": "pragma",
90+
"scope": "pragma.juvix",
9191
"settings": {
9292
"foreground": "#7e7d7d",
9393
"fontStyle": "italic"
9494
}
9595
},
9696
{
97-
"scope": "axiom",
97+
"scope": "axiom.juvix",
9898
"settings": {
9999
"foreground": "#ad1313"
100100
}
101101
},
102102
{
103-
"scope": "constructor",
103+
"scope": "constructor.juvix",
104104
"settings": {
105105
"foreground": "#8d8dff"
106106
}
107107
},
108108
{
109-
"scope": "error",
109+
"scope": "error.juvix",
110110
"settings": {
111111
"foreground": "#bd3744",
112112
"fontStyle": "bold"
113113
}
114114
},
115115
{
116-
"scope": "function",
116+
"scope": "function.juvix",
117117
"settings": {
118118
"foreground": "#d98200"
119119
}
120120
},
121121
{
122-
"scope": "type",
122+
"scope": "type.juvix",
123123
"settings": {
124124
"foreground": "#769c03"
125125
}
126126
},
127127
{
128-
"scope": "keyword",
128+
"scope": "keyword.juvix",
129129
"settings": {
130130
"foreground": "#0083e1"
131131
}
132132
},
133133
{
134-
"scope": "module",
134+
"scope": "module.juvix",
135135
"settings": {
136136
"foreground": "#1b1b1b"
137137
}
138138
},
139139
{
140-
"scope": "number",
140+
"scope": "number.juvix",
141141
"settings": {
142142
"foreground": "#a0d500"
143143
}
144144
},
145145
{
146-
"scope": "string",
146+
"scope": "string.juvix",
147147
"settings": {
148148
"foreground": "#ff4d00"
149149
}
150150
},
151151
{
152-
"scope": "storage",
152+
"scope": "storage.juvix",
153153
"settings": {
154154
"foreground": "#befc04"
155155
}
156156
},
157157
{
158-
"scope": "punctuation.definition.group",
158+
"scope": "punctuation.definition.group.juvix",
159159
"settings": {
160160
"foreground": "#FF0000"
161161
}
@@ -165,82 +165,82 @@
165165
"[*Dark*]": {
166166
"textMateRules": [
167167
{
168-
"scope": "comment",
168+
"scope": "comment.documentation.block.juvix, comment.line.double-dash.juvix",
169169
"settings": {
170170
"foreground": "#646464",
171171
"fontStyle": "italic"
172172
}
173173
},
174174
{
175-
"scope": "pragma",
175+
"scope": "pragma.juvix",
176176
"settings": {
177177
"foreground": "#a9a9a9",
178178
"fontStyle": "italic"
179179
}
180180
},
181181
{
182-
"scope": "axiom",
182+
"scope": "axiom.juvix",
183183
"settings": {
184184
"foreground": "#f07171"
185185
}
186186
},
187187
{
188-
"scope": "constructor",
188+
"scope": "constructor.juvix",
189189
"settings": {
190190
"foreground": "#8d8dff"
191191
}
192192
},
193193
{
194-
"scope": "error",
194+
"scope": "error.juvix",
195195
"settings": {
196196
"foreground": "#bd3744",
197197
"fontStyle": "bold"
198198
}
199199
},
200200
{
201-
"scope": "function",
201+
"scope": "function.juvix",
202202
"settings": {
203203
"foreground": "#feb64a"
204204
}
205205
},
206206
{
207-
"scope": "type",
207+
"scope": "type.juvix",
208208
"settings": {
209209
"foreground": "#86b300"
210210
}
211211
},
212212
{
213-
"scope": "keyword",
213+
"scope": "keyword.juvix",
214214
"settings": {
215215
"foreground": "#399ee6"
216216
}
217217
},
218218
{
219-
"scope": "module",
219+
"scope": "module.juvix",
220220
"settings": {
221221
"foreground": "#ffffff"
222222
}
223223
},
224224
{
225-
"scope": "number",
225+
"scope": "number.juvix",
226226
"settings": {
227227
"foreground": "#befc04"
228228
}
229229
},
230230
{
231-
"scope": "string",
231+
"scope": "string.juvix",
232232
"settings": {
233233
"foreground": "#ff4d00"
234234
}
235235
},
236236
{
237-
"scope": "storage",
237+
"scope": "storage.juvix",
238238
"settings": {
239239
"foreground": "#befc04"
240240
}
241241
},
242242
{
243-
"scope": "punctuation.definition.group",
243+
"scope": "punctuation.definition.group.juvix",
244244
"settings": {
245245
"foreground": "#FF0000"
246246
}

syntaxes/Juvix.json

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
{
22
"name": "Juvix",
33
"scopeName": "source.juvix",
4-
"fileTypes": [
5-
"juvix"
6-
],
4+
"fileTypes": ["juvix"],
75
"patterns": [
86
{
97
"include": "#comment"
@@ -67,30 +65,30 @@
6765
"patterns": [
6866
{
6967
"match": "\".*\"",
70-
"name": "string"
68+
"name": "string.juvix"
7169
}
7270
]
7371
},
7472
"number": {
7573
"patterns": [
7674
{
7775
"match": "\\b(\\d+)\\b",
78-
"name": "number"
76+
"name": "number.juvix"
7977
}
8078
]
8179
},
8280
"keyword": {
8381
"patterns": [
8482
{
8583
"match": "\\b(let|in|case|of|type|with|trait|instance|deriving|module|end|import|open|using|hiding|public|as|terminating|positive|axiom|Type|builtin|syntax|if|else)\\b",
86-
"name": "keyword"
84+
"name": "keyword.juvix"
8785
},
8886
{
89-
"name": "delimiter",
87+
"name": "delimiter.juvix",
9088
"match": "(;)"
9189
},
9290
{
93-
"name": "keyword",
91+
"name": "keyword.juvix",
9492
"match": "(:=|:|\\/|->|→|↦|@|\\|)"
9593
}
9694
]
@@ -99,15 +97,15 @@
9997
"patterns": [
10098
{
10199
"match": "\\b(true|false)\\b",
102-
"name": "constant.language"
100+
"name": "constant.language.juvix"
103101
}
104102
]
105103
},
106104
"operator": {
107105
"patterns": [
108106
{
109107
"match": "(\\+|-|\\*|\\^|\\$|&&|\\!|==|>>|<=|>=)",
110-
"name": "function"
108+
"name": "function.juvix"
111109
}
112110
]
113111
}

0 commit comments

Comments
 (0)