+1
vscode/LICENSE
+1
vscode/LICENSE
···
1
+
Apache-2.0 OR MIT
+3
vscode/README.md
+3
vscode/README.md
+25
vscode/language-configuration.json
+25
vscode/language-configuration.json
···
1
+
{
2
+
"comments": {
3
+
"lineComment": ";"
4
+
},
5
+
// symbols used as brackets
6
+
"brackets": [
7
+
["{", "}"],
8
+
["[", "]"],
9
+
["(", ")"]
10
+
],
11
+
// symbols that are auto closed when typing
12
+
"autoClosingPairs": [
13
+
["{", "}"],
14
+
["[", "]"],
15
+
["(", ")"],
16
+
["\"", "\""]
17
+
],
18
+
// symbols that can be used to surround a selection
19
+
"surroundingPairs": [
20
+
["{", "}"],
21
+
["[", "]"],
22
+
["(", ")"],
23
+
["\"", "\""]
24
+
]
25
+
}
+37
vscode/package.json
+37
vscode/package.json
···
1
+
{
2
+
"name": "tree-sitter-graph",
3
+
"version": "0.1.0",
4
+
"publisher": "tree-sitter",
5
+
"engines": {
6
+
"vscode": "^1.60.0"
7
+
},
8
+
"license": "Apache-2.0 OR MIT",
9
+
"description": "Syntax support for tree-sitter-graph",
10
+
"homepage": "https://crates.io/crates/tree-sitter-graph",
11
+
"author": "tree-sitter authors",
12
+
"repository": {
13
+
"type": "git",
14
+
"url": "https://github.com/tree-sitter/tree-sitter-graph.git"
15
+
},
16
+
"categories": [
17
+
"Programming Languages"
18
+
],
19
+
"contributes": {
20
+
"languages": [
21
+
{
22
+
"id": "tree-sitter-graph",
23
+
"extensions": [
24
+
".tsg"
25
+
],
26
+
"configuration": "./language-configuration.json"
27
+
}
28
+
],
29
+
"grammars": [
30
+
{
31
+
"language": "tree-sitter-graph",
32
+
"scopeName": "source.tsg",
33
+
"path": "./syntaxes/tree-sitter-graph.tmLanguage.json"
34
+
}
35
+
]
36
+
}
37
+
}
+52
vscode/syntaxes/tree-sitter-graph.tmLanguage.json
+52
vscode/syntaxes/tree-sitter-graph.tmLanguage.json
···
1
+
{
2
+
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
3
+
"name": "Tree-Sitter Graph",
4
+
"patterns": [{
5
+
"include": "#keywords"
6
+
}, {
7
+
"include": "#functions"
8
+
}, {
9
+
"include": "#constants"
10
+
}, {
11
+
"include": "#strings"
12
+
}, {
13
+
"include": "#comments"
14
+
}],
15
+
"repository": {
16
+
"keywords": {
17
+
"patterns": [{
18
+
"name": "keyword.control.tsg",
19
+
"match": "^\\s*(attr|attribute|edge|for|global|if|let|node|none|print|scan|set|some|var)\\b"
20
+
}]
21
+
},
22
+
"functions": {
23
+
"patterns": [{
24
+
"name": "support.function.tsg",
25
+
"match":"(?<=\\(\\s*)(and|end-column|end-row|is-empty|is-null|length|named-child-count|named-child-index|node|node-type|not|or|plus|replace|source-text|start-column|start-row)\\b"
26
+
}]
27
+
},
28
+
"constants": {
29
+
"patterns": [{
30
+
"name": "constant.language.tsg",
31
+
"match": "\\b(#false|#nil|#true)\\b"
32
+
}]
33
+
},
34
+
"strings": {
35
+
"name": "string.quoted.double.tsg",
36
+
"begin": "\"",
37
+
"end": "\"",
38
+
"patterns": [{
39
+
"name": "constant.character.escape.tsg",
40
+
"match": "\\\\."
41
+
}]
42
+
},
43
+
"comments": {
44
+
"patterns": [{
45
+
"name": "comment.line.semicolon.tsg",
46
+
"begin": ";",
47
+
"end": "$"
48
+
}]
49
+
}
50
+
},
51
+
"scopeName": "source.tsg"
52
+
}