Add textobject for gdscript (#3760)

change-detection
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 | ✓ | | | |
| fish | ✓ | ✓ | ✓ | |
| fortran | ✓ | | ✓ | `fortls` |
| gdscript | ✓ | | | |
| gdscript | ✓ | | | |
| git-attributes | ✓ | | | |
| git-commit | ✓ | | | |
| git-config | ✓ | | | |

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

@ -3,6 +3,11 @@
((identifier) @constant
(#match? @constant "^[A-Z][A-Z_]*$"))
; class
(class_name_statement (name) @type)
(class_definition (name) @type)
; Function calls
(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