diff options
author | Connor Lay (Clay) | 2022-06-18 21:24:01 +0000 |
---|---|---|
committer | Michael Davis | 2022-06-21 16:32:03 +0000 |
commit | 67f6c85792dbdbe0ff3f9328874c7ab23ff5569b (patch) | |
tree | 2f3be3d74b44b1639328f348042ab0484cb283dc /runtime/queries | |
parent | 43027d91046f79d6dc495b351cdcbfd3819cd9e1 (diff) |
text-objects: add test capture & elixir queries
Diffstat (limited to 'runtime/queries')
-rw-r--r-- | runtime/queries/elixir/textobjects.scm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/runtime/queries/elixir/textobjects.scm b/runtime/queries/elixir/textobjects.scm index 52a6f66d..227a52f4 100644 --- a/runtime/queries/elixir/textobjects.scm +++ b/runtime/queries/elixir/textobjects.scm @@ -16,7 +16,7 @@ (pair value: (_) @function.inside))?)? (do_block (_)* @function.inside)?) - (#match? @_keyword "^(def|defdelegate|defguard|defguardp|defmacro|defmacrop|defn|defnp|defp|test|describe|setup)$")) @function.around + (#match? @_keyword "^(def|defdelegate|defguard|defguardp|defmacro|defmacrop|defn|defnp|defp)$")) @function.around (anonymous_function (stab_clause right: (body) @function.inside)) @function.around @@ -25,3 +25,9 @@ target: (identifier) @_keyword (do_block (_)* @class.inside)) (#match? @_keyword "^(defmodule|defprotocol|defimpl)$")) @class.around + +((call + target: (identifier) @_keyword + (arguments ((string) . (_)?)) + (do_block (_)* @test.inside)?) + (#match? @_keyword "^(test|describe)$")) @test.around |