Skip to content
This repository was archived by the owner on Jul 1, 2024. It is now read-only.

Commit ca4bdca

Browse files
committed
Add a tree-sitter item to `package.json
This should allow detecting powershell files from the tree-sitter CLI by shebang, file type, or injection specifier.
1 parent 1ac0905 commit ca4bdca

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

package.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,17 @@
1717
},
1818
"devDependencies": {
1919
"tree-sitter-cli": "^0.15.2"
20-
}
20+
},
21+
"tree-sitter": [
22+
{
23+
"scope": "source.powershell",
24+
"file-types": [
25+
".ps1",
26+
".psd1",
27+
".psm1"
28+
],
29+
"injection-regex": "(powershell|pwsh)",
30+
"first-line-regex": "^#!.*\b(powershell|pwsh)\b.*$"
31+
}
32+
]
2133
}

0 commit comments

Comments
 (0)