Add textobject for gdscript (#3760)

pull/1819/head
Erasin 2 years ago committed by GitHub
parent 54e78dd24f
commit a15420ed1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -29,7 +29,7 @@
| esdl | ✓ | | | | | esdl | ✓ | | | |
| fish | ✓ | ✓ | ✓ | | | fish | ✓ | ✓ | ✓ | |
| fortran | ✓ | | ✓ | `fortls` | | fortran | ✓ | | ✓ | `fortls` |
| gdscript | ✓ | | | | | gdscript | ✓ | | | |
| git-attributes | ✓ | | | | | git-attributes | ✓ | | | |
| git-commit | ✓ | | | | | git-commit | ✓ | | | |
| git-config | ✓ | | | | | git-config | ✓ | | | |

@ -1327,7 +1327,7 @@ shebangs = []
roots = ["project.godot"] roots = ["project.godot"]
auto-format = true auto-format = true
comment-token = "#" comment-token = "#"
indent = { tab-width = 4, unit = " " } indent = { tab-width = 4, unit = "\t" }
[[grammar]] [[grammar]]
name = "gdscript" name = "gdscript"

@ -3,6 +3,11 @@
((identifier) @constant ((identifier) @constant
(#match? @constant "^[A-Z][A-Z_]*$")) (#match? @constant "^[A-Z][A-Z_]*$"))
; class
(class_name_statement (name) @type)
(class_definition (name) @type)
; Function calls ; Function calls
(attribute_call (identifier) @function) (attribute_call (identifier) @function)

@ -0,0 +1,17 @@
(class_definition
(body) @class.inside) @class.around
(function_definition
(body) @function.inside) @function.around
(parameters
[
(identifier)
(typed_parameter)
(default_parameter)
(typed_default_parameter)
] @parameter.inside @parameter.around)
(comment) @comment.inside
(comment)+ @comment.around
Loading…
Cancel
Save