Skip to content

Commit

Permalink
Add godot resource support
Browse files Browse the repository at this point in the history
  • Loading branch information
erasin committed Sep 9, 2022
1 parent fae9203 commit d2a760c
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
1 change: 1 addition & 0 deletions book/src/generated/lang-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
| gleam ||| | `gleam` |
| glsl |||| |
| go |||| `gopls` |
| godot-resource || | | |
| gomod || | | `gopls` |
| gotmpl || | | `gopls` |
| gowork || | | `gopls` |
Expand Down
15 changes: 15 additions & 0 deletions languages.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1333,6 +1333,21 @@ indent = { tab-width = 4, unit = " " }
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"
Expand Down
28 changes: 28 additions & 0 deletions runtime/queries/godot-resource/highlights.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
(section (identifier) @type.builtin)

(attribute (identifier) @attribute)
(property (path) @attribute)
(constructor (identifier) @constructor)

(string) @string
(integer) @constant.numeric.integer
(float) @constant.numberic.float

(true) @constant.builtin.boolean
(false) @constant.builtin.boolean

[
"["
"]"
] @tag

[
"("
")"
"{"
"}"
] @punctuation.bracket

"=" @operator

(ERROR) @error

0 comments on commit d2a760c

Please sign in to comment.