aboutsummaryrefslogtreecommitdiff
path: root/runtime/queries/elixir
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/queries/elixir')
-rw-r--r--runtime/queries/elixir/textobjects.scm8
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