Skip to content

Commit be94a77

Browse files
Lukasz Langa1st1
Lukasz Langa
authored andcommitted
Make file types consistent between grammars/ and package.json
This made .pyi, .gyp, and .gypi available in all editors. I put comments there to help others find the other file in the future. Would be nicer still to automate this but I frankly don't have cycles for that now. Test plan: ran `make test`, passed. Installed this package locally with `apm link`, confirm new file types are visible.
1 parent 0580d7e commit be94a77

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

grammars/MagicPython.cson

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ fileTypes: [
77
"rpy"
88
"pyw"
99
"cpy"
10+
"pyi"
1011
"SConstruct"
1112
"Sconstruct"
1213
"sconstruct"

grammars/MagicPython.tmLanguage

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<string>rpy</string>
1515
<string>pyw</string>
1616
<string>cpy</string>
17+
<string>pyi</string>
1718
<string>SConstruct</string>
1819
<string>Sconstruct</string>
1920
<string>sconstruct</string>

grammars/src/MagicPython.syntax.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
---
22
name: MagicPython
33
scopeName: source.python
4-
fileTypes: [py, py3, rpy, pyw, cpy, SConstruct,
5-
Sconstruct, sconstruct, SConscript,
4+
# NOTE: remember to update package.json with VSCode file types.
5+
fileTypes: [py, py3, rpy, pyw, cpy, pyi,
6+
SConstruct, Sconstruct, sconstruct, SConscript,
67
gyp, gypi]
78
first_line_match: ^#!/.*\bpython[\d\.]*\b
89
firstLineMatch: ^#!/.*\bpython[\d\.]*\b

package.json

+7-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@
3131
"theme": "dark"
3232
},
3333
"contributes": {
34-
"//": "This section is for VSCode",
34+
"//": [
35+
"This section is for VSCode.",
36+
"NOTE: remember to update grammar/src/MagicPython.syntax.yaml, too."
37+
],
3538
"languages": [
3639
{
3740
"id": "python",
@@ -49,7 +52,9 @@
4952
".SConstruct",
5053
".Sconstruct",
5154
".sconstruct",
52-
".SConscript"
55+
".SConscript",
56+
".gyp",
57+
".gypi"
5358
]
5459
}
5560
],

0 commit comments

Comments
 (0)