Skip to content

Commit

Permalink
Add godot resource support (helix-editor#3759)
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
  • Loading branch information
2 people authored and Shekhinah Memmel committed Dec 11, 2022
1 parent 86689a8 commit a3404e8
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) @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

0 comments on commit a3404e8

Please sign in to comment.