Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'runtime/queries/typst/textobjects.scm')
-rw-r--r--runtime/queries/typst/textobjects.scm23
1 files changed, 23 insertions, 0 deletions
diff --git a/runtime/queries/typst/textobjects.scm b/runtime/queries/typst/textobjects.scm
new file mode 100644
index 00000000..516c0afe
--- /dev/null
+++ b/runtime/queries/typst/textobjects.scm
@@ -0,0 +1,23 @@
+(let
+ pattern: (call)
+ value: (_) @function.inside) @function.around
+
+(call
+ (group
+ ((_) @parameter.inside . ","? @parameter.around) @parameter.around))
+
+(lambda
+ pattern:
+ (group
+ ((_) @parameter.inside . ","? @parameter.around) @parameter.around)
+ value: (_) @function.inside) @function.around
+
+(group
+ [
+ (tagged (_) @entry.inside)
+ (_)
+ ] @entry.around)
+
+(comment) @comment.inside
+
+(comment)+ @comment.around