on master help sign in
Add godot resource support (#3759)

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>

commit54e78dd24f2cfcf98a974d6f4d5846cc1cb5c9eb authorErasin <erasinoo@gmail.com> dateSat 10 Sep 2022, 21:45 (4 years ago) parent5489c9a
3 files changed+44
book/src/generated/lang-support.md+1 languages.toml+15 runtime/queries/godot-resource/highlights.scm+28
book/src/generated/lang-support.md+1
@@ -38,6 +38,7 @@
3838| gleam | ✓ | ✓ | | `gleam` |
3939| glsl | ✓ | ✓ | ✓ | |
4040| go | ✓ | ✓ | ✓ | `gopls` |
41+| godot-resource | ✓ | | | |
4142| gomod | ✓ | | | `gopls` |
4243| gotmpl | ✓ | | | `gopls` |
4344| gowork | ✓ | | | `gopls` |
languages.toml+15
@@ -1333,6 +1333,21 @@ indent = { tab-width = 4, unit = " " }
13331333name = "gdscript"
13341334source = { git = "https://github.com/PrestonKnopp/tree-sitter-gdscript", rev = "2a6abdaa47fcb91397e09a97c7433fd995ea46c6" }
13351335
1336+[[language]]
1337+name = "godot-resource"
1338+scope = "source.tscn"
1339+injection-regex = "godot"
1340+file-types = ["tscn","tres"]
1341+shebangs = []
1342+roots = ["project.godot"]
1343+auto-format = false
1344+comment-token = "#"
1345+indent = { tab-width = 4, unit = "\t" }
1346+
1347+[[grammar]]
1348+name = "godot-resource"
1349+source = { git = "https://github.com/PrestonKnopp/tree-sitter-godot-resource", rev = "b6ef0768711086a86b3297056f9ffb5cc1d77b4a" }
1350+
13361351[[language]]
13371352name = "nu"
13381353scope = "source.nu"
runtime/queries/godot-resource/highlights.scmnew file+28
@@ -0,0 +1,28 @@
1+(section (identifier) @type.builtin)
2+
3+(attribute (identifier) @attribute)
4+(property (path) @variable.other.member)
5+(constructor (identifier) @constructor)
6+
7+(string) @string
8+(integer) @constant.numeric.integer
9+(float) @constant.numeric.float
10+
11+(true) @constant.builtin.boolean
12+(false) @constant.builtin.boolean
13+
14+[
15+ "["
16+ "]"
17+] @tag
18+
19+[
20+ "("
21+ ")"
22+ "{"
23+ "}"
24+] @punctuation.bracket
25+
26+"=" @operator
27+
28+(ERROR) @error