Skip to content

Commit efe32bb

Browse files
committed
Add grammar development extension for VSCode
1 parent a4c53b6 commit efe32bb

File tree

4 files changed

+48
-0
lines changed

4 files changed

+48
-0
lines changed

.vscode/launch.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@
3030
"request": "attach",
3131
"hostName": "localhost",
3232
"port": 5005
33+
},
34+
{
35+
"type": "extensionHost",
36+
"name": "Run Grammar Dev Extension",
37+
"request": "launch",
38+
"args": [
39+
"--extensionDevelopmentPath=${workspaceFolder}/grammars/vscode-grammar-dev"
40+
]
3341
}
3442
]
3543
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.vscode/**
2+
.vscode-test/**
3+
.gitignore
4+
vsc-extension-quickstart.md

grammars/vscode-grammar-dev/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Grammar Development Extension for VSCode
2+
3+
A small VSCode extension for development of the Kotlin grammar.
4+
5+
> Note: The actual Kotlin support for VSCode, including the language client, is located in the [`vscode-kotlin` repository](https://github.com/fwcd/vscode-kotlin).
6+
7+
## Usage
8+
9+
The most convenient way to run the extension is to simply use the debug configuration `Run Grammar Dev` in this repo.
10+
11+
> Note: VSCode might show a warning that grammar paths are located outside of the extension folder. This message can be ignored, since the extension is only indended for development anyway.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "kotlin-grammar-dev",
3+
"displayName": "Kotlin Grammar Development",
4+
"description": "Grammar development extension for Kotlin",
5+
"version": "0.0.1",
6+
"engines": {
7+
"vscode": "^1.67.0"
8+
},
9+
"categories": [
10+
"Programming Languages"
11+
],
12+
"contributes": {
13+
"languages": [{
14+
"id": "kotlin",
15+
"aliases": ["Kotlin", "kotlin"],
16+
"extensions": [".kt",".kts"],
17+
"configuration": "../kotlin.configuration.json"
18+
}],
19+
"grammars": [{
20+
"language": "kotlin",
21+
"scopeName": "source.kotlin",
22+
"path": "../Kotlin.tmLanguage.json"
23+
}]
24+
}
25+
}

0 commit comments

Comments
 (0)