From 1d7eabff68c81b8b9813f058a67df185bb12b4e6 Mon Sep 17 00:00:00 2001 From: Novus Nota <68142933+novusnota@users.noreply.github.com> Date: Sun, 29 Sep 2024 19:06:04 +0200 Subject: [PATCH 1/2] feat(tact): update queries --- queries/tact/textobjects.scm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/queries/tact/textobjects.scm b/queries/tact/textobjects.scm index 328af9a0..82416950 100644 --- a/queries/tact/textobjects.scm +++ b/queries/tact/textobjects.scm @@ -1,6 +1,21 @@ ; See: https://github.com/nvim-treesitter/nvim-treesitter-textobjects#built-in-textobjects ; function.inner & outer ; ---------------------- +; asm +(asm_function + body: (_)) @function.outer + +(asm_function + body: (asm_function_body + . + "{" + . + (_) @_start + (_)? @_end + . + "}") + (#make-range! "function.inner" @_start @_end)) + ; global (global_function body: (_)) @function.outer @@ -256,6 +271,9 @@ (_ (block_statement) @block.inner) @block.outer +(_ + (asm_list) @block.inner) @block.outer + ; call.inner & outer ; ------------------ (method_call_expression) @call.outer From 6853578737f2524e32df4dbf553b56c80e761393 Mon Sep 17 00:00:00 2001 From: Novus Nota <68142933+novusnota@users.noreply.github.com> Date: Wed, 12 Mar 2025 12:22:02 +0100 Subject: [PATCH 2/2] tact-1.6.0 --- queries/tact/textobjects.scm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/queries/tact/textobjects.scm b/queries/tact/textobjects.scm index 82416950..cdc47440 100644 --- a/queries/tact/textobjects.scm +++ b/queries/tact/textobjects.scm @@ -384,6 +384,21 @@ ","? @_end (#make-range! "parameter.outer" @parameter.inner @_end)) +; second and following +(destruct_bind_list + "," @_start + . + (_) @parameter.inner + (#make-range! "parameter.outer" @_start @parameter.inner)) + +; first +(destruct_bind_list + . + (_) @parameter.inner + . + ","? @_end + (#make-range! "parameter.outer" @parameter.inner @_end)) + ; single parameter (receive_function parameter: (_) @parameter.inner @parameter.outer)