Skip to content

Commit 7d7a953

Browse files
authored
Merge pull request #3 from AyhamAl-Ali/dev
🚀 Add VSCode testing
2 parents 48e1fd3 + 5dcb624 commit 7d7a953

File tree

6 files changed

+72
-2
lines changed

6 files changed

+72
-2
lines changed

README.md

+13-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,19 @@ If a new feature is not displayed or tested within this file, an example should
3434

3535
### VS Code Testing
3636

37-
Todo.
37+
1- Install [vsce](https://code.visualstudio.com/api/working-with-extensions/publishing-extension#vsce) on your system
38+
2- Change directory to `~/skript-grammar/syntax-vscode` (~ is your home directory or where you downloaded the files)
39+
```
40+
$ cd ~/skript-grammar/syntax-vscode
41+
```
42+
3- Package the files for vscode using vsce and follow up with the process
43+
```
44+
$ vsce package
45+
```
46+
4- Install the extension (replace 1.x.x with the correct numbers from the output file)
47+
```
48+
$ code --install-extension ./skript-grammar-1.x.x.vsix
49+
```
3850

3951
### Atom Testing
4052

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
},
1919
"homepage": "https://github.com/SkriptLang/skript-grammar",
2020
"dependencies": {
21-
"cson-parser": "^4.0.9"
21+
"cson-parser": "^4.0.9",
22+
"npm": "^8.5.1"
2223
}
2324
}

syntax-vscode/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# skript-grammar (VSCode)
2+
TODO.
3.96 KB
Binary file not shown.
+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"comments": {
3+
// symbol used for single line comment. Remove this entry if your language does not support line comments
4+
"lineComment": "#",
5+
// symbols used for start and end a block comment. Remove this entry if your language does not support block comments
6+
// "blockComment": [ "/*", "*/" ]
7+
},
8+
// symbols used as brackets
9+
"brackets": [
10+
["{", "}"],
11+
["[", "]"],
12+
["(", ")"]
13+
],
14+
// symbols that are auto closed when typing
15+
"autoClosingPairs": [
16+
["{", "}"],
17+
["[", "]"],
18+
["(", ")"],
19+
["\"", "\""],
20+
["'", "'"]
21+
],
22+
// symbols that can be used to surround a selection
23+
"surroundingPairs": [
24+
["{", "}"],
25+
["[", "]"],
26+
["(", ")"],
27+
["\"", "\""],
28+
["'", "'"]
29+
]
30+
}

syntax-vscode/package.json

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "skript-grammar",
3+
"displayName": "Skript",
4+
"description": "The grammar source for all official Skript highlighters.",
5+
"version": "1.0.0",
6+
"engines": {
7+
"vscode": "^1.64.0"
8+
},
9+
"categories": [
10+
"Programming Languages"
11+
],
12+
"contributes": {
13+
"languages": [{
14+
"id": "skript",
15+
"aliases": ["Skript", "skript"],
16+
"extensions": [".sk"],
17+
"configuration": "./language-configuration.json"
18+
}],
19+
"grammars": [{
20+
"language": "skript",
21+
"scopeName": "source.skript",
22+
"path": "./syntaxes/skript.json"
23+
}]
24+
}
25+
}

0 commit comments

Comments
 (0)