aboutsummaryrefslogtreecommitdiff
path: root/runtime/queries/tact/textobjects.scm
diff options
context:
space:
mode:
authorNovus Nota2024-02-04 01:09:11 +0000
committerGitHub2024-02-04 01:09:11 +0000
commitd1054de3ced44903c7bdcf5886d8481eb40a948f (patch)
treec02d4845b68072a94f1daff489043f9d3f7394f8 /runtime/queries/tact/textobjects.scm
parent3f380722fbb2fd676ccc0a9dbbea4ddc4871c6ea (diff)
feat: Add `Tact` language support (#9512)
Re-submitting
Diffstat (limited to 'runtime/queries/tact/textobjects.scm')
-rw-r--r--runtime/queries/tact/textobjects.scm58
1 files changed, 58 insertions, 0 deletions
diff --git a/runtime/queries/tact/textobjects.scm b/runtime/queries/tact/textobjects.scm
new file mode 100644
index 00000000..54d07014
--- /dev/null
+++ b/runtime/queries/tact/textobjects.scm
@@ -0,0 +1,58 @@
+; function.inside & around
+; ------------------------
+
+(static_function
+ body: (_) @function.inside) @function.around
+
+(init_function
+ body: (_) @function.inside) @function.around
+
+(bounced_function
+ body: (_) @function.inside) @function.around
+
+(receive_function
+ body: (_) @function.inside) @function.around
+
+(external_function
+ body: (_) @function.inside) @function.around
+
+(function
+ body: (_) @function.inside) @function.around
+
+; class.inside & around
+; ---------------------
+
+(struct
+ body: (_) @class.inside) @class.around
+
+(message
+ body: (_) @class.inside) @class.around
+
+(contract
+ body: (_) @class.inside) @class.around
+
+; NOTE: Marked as @definition.interface in tags, as it's semantically correct
+(trait
+ body: (_) @class.inside) @class.around
+
+; parameter.inside & around
+; -------------------------
+
+(parameter_list
+ ((_) @parameter.inside . ","? @parameter.around) @parameter.around)
+
+(argument_list
+ ((_) @parameter.inside . ","? @parameter.around) @parameter.around)
+
+(instance_argument_list
+ ((_) @parameter.inside . ","? @parameter.around) @parameter.around)
+
+; comment.inside
+; --------------
+
+(comment) @comment.inside
+
+; comment.around
+; --------------
+
+(comment)+ @comment.around \ No newline at end of file