aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--book/src/generated/lang-support.md1
-rw-r--r--languages.toml15
-rw-r--r--runtime/queries/godot-resource/highlights.scm28
3 files changed, 44 insertions, 0 deletions
diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md
index ca7c1248..70609464 100644
--- a/book/src/generated/lang-support.md
+++ b/book/src/generated/lang-support.md
@@ -38,6 +38,7 @@
| gleam | ✓ | ✓ | | `gleam` |
| glsl | ✓ | ✓ | ✓ | |
| go | ✓ | ✓ | ✓ | `gopls` |
+| godot-resource | ✓ | | | |
| gomod | ✓ | | | `gopls` |
| gotmpl | ✓ | | | `gopls` |
| gowork | ✓ | | | `gopls` |
diff --git a/languages.toml b/languages.toml
index 15fbe7fb..1a3be93c 100644
--- a/languages.toml
+++ b/languages.toml
@@ -1334,6 +1334,21 @@ name = "gdscript"
source = { git = "https://github.com/PrestonKnopp/tree-sitter-gdscript", rev = "2a6abdaa47fcb91397e09a97c7433fd995ea46c6" }
[[language]]
+name = "godot-resource"
+scope = "source.tscn"
+injection-regex = "godot"
+file-types = ["tscn","tres"]
+shebangs = []
+roots = ["project.godot"]
+auto-format = false
+comment-token = "#"
+indent = { tab-width = 4, unit = "\t" }
+
+[[grammar]]
+name = "godot-resource"
+source = { git = "https://github.com/PrestonKnopp/tree-sitter-godot-resource", rev = "b6ef0768711086a86b3297056f9ffb5cc1d77b4a" }
+
+[[language]]
name = "nu"
scope = "source.nu"
injection-regex = "nu"
diff --git a/runtime/queries/godot-resource/highlights.scm b/runtime/queries/godot-resource/highlights.scm
new file mode 100644
index 00000000..18dae41f
--- /dev/null
+++ b/runtime/queries/godot-resource/highlights.scm
@@ -0,0 +1,28 @@
+(section (identifier) @type.builtin)
+
+(attribute (identifier) @attribute)
+(property (path) @variable.other.member)
+(constructor (identifier) @constructor)
+
+(string) @string
+(integer) @constant.numeric.integer
+(float) @constant.numeric.float
+
+(true) @constant.builtin.boolean
+(false) @constant.builtin.boolean
+
+[
+ "["
+ "]"
+] @tag
+
+[
+ "("
+ ")"
+ "{"
+ "}"
+] @punctuation.bracket
+
+"=" @operator
+
+(ERROR) @error \ No newline at end of file