aboutsummaryrefslogtreecommitdiffstats
path: root/queries/gdscript
diff options
context:
space:
mode:
authorTJ DeVries <devries.timothyj@gmail.com>2020-11-17 17:28:53 -0500
committerStephan Seitz <stephan.lauf@yahoo.de>2020-12-31 14:27:43 +0100
commit5236768c3308314f0d4bf2066d4411b2df4d59e3 (patch)
treefe2e3ed49a6f4726b98521e208ba5e9bdbcdbe12 /queries/gdscript
parentUpdate lockfile.json (diff)
downloadnvim-treesitter-5236768c3308314f0d4bf2066d4411b2df4d59e3.tar
nvim-treesitter-5236768c3308314f0d4bf2066d4411b2df4d59e3.tar.gz
nvim-treesitter-5236768c3308314f0d4bf2066d4411b2df4d59e3.tar.bz2
nvim-treesitter-5236768c3308314f0d4bf2066d4411b2df4d59e3.tar.lz
nvim-treesitter-5236768c3308314f0d4bf2066d4411b2df4d59e3.tar.xz
nvim-treesitter-5236768c3308314f0d4bf2066d4411b2df4d59e3.tar.zst
nvim-treesitter-5236768c3308314f0d4bf2066d4411b2df4d59e3.zip
add gdscript
Diffstat (limited to 'queries/gdscript')
-rw-r--r--queries/gdscript/highlights.scm27
-rw-r--r--queries/gdscript/locals.scm10
2 files changed, 37 insertions, 0 deletions
diff --git a/queries/gdscript/highlights.scm b/queries/gdscript/highlights.scm
new file mode 100644
index 000000000..06b7c8df6
--- /dev/null
+++ b/queries/gdscript/highlights.scm
@@ -0,0 +1,27 @@
+(identifier) @variable
+
+(name) @variable
+(type) @type
+(comment) @comment
+
+(enum_definition
+ (name) @constant) @Statement
+
+(function_definition
+ (name) @function
+ (parameters
+ (identifier)* @parameter) @punctuation.bracket) @Statement
+
+(return_statement) @Statement
+
+(variable_statement
+ (inferred_type)? @operator) @Statement
+
+(call (identifier) @function) @punctuation.bracket
+(attribute (attribute_call (identifier) @function) @punctuation.bracket)
+
+; simple items
+[ (binary_operator) (comparison_operator) ] @operator
+[ (false) (true) ] @boolean
+(string) @string
+(integer) @number
diff --git a/queries/gdscript/locals.scm b/queries/gdscript/locals.scm
new file mode 100644
index 000000000..313af2aef
--- /dev/null
+++ b/queries/gdscript/locals.scm
@@ -0,0 +1,10 @@
+(function_definition) @definition.function
+
+[
+ (extends_statement)
+ (variable_statement)
+ (expression_statement)
+ (if_statement)
+ (function_definition)
+ (body)
+] @scope