Skip to content

Commit 7b8f815

Browse files
erasinShekhinah Memmel
authored andcommitted
Add textobject for gdscript (helix-editor#3760)
1 parent a3404e8 commit 7b8f815

File tree

4 files changed

+24
-2
lines changed

4 files changed

+24
-2
lines changed

book/src/generated/lang-support.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
| esdl || | | |
3030
| fish |||| |
3131
| fortran || || `fortls` |
32-
| gdscript || | | |
32+
| gdscript || | | |
3333
| git-attributes || | | |
3434
| git-commit || | | |
3535
| git-config || | | |

languages.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1327,7 +1327,7 @@ shebangs = []
13271327
roots = ["project.godot"]
13281328
auto-format = true
13291329
comment-token = "#"
1330-
indent = { tab-width = 4, unit = " " }
1330+
indent = { tab-width = 4, unit = "\t" }
13311331

13321332
[[grammar]]
13331333
name = "gdscript"

runtime/queries/gdscript/highlights.scm

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
((identifier) @constant
44
(#match? @constant "^[A-Z][A-Z_]*$"))
55

6+
; class
7+
(class_name_statement (name) @type)
8+
(class_definition (name) @type)
9+
10+
611
; Function calls
712

813
(attribute_call (identifier) @function)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
(class_definition
3+
(body) @class.inside) @class.around
4+
5+
(function_definition
6+
(body) @function.inside) @function.around
7+
8+
(parameters
9+
[
10+
(identifier)
11+
(typed_parameter)
12+
(default_parameter)
13+
(typed_default_parameter)
14+
] @parameter.inside @parameter.around)
15+
16+
(comment) @comment.inside
17+
(comment)+ @comment.around

0 commit comments

Comments
 (0)