Change summary
crates/zed/src/languages/elixir/outline.scm | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
Detailed changes
@@ -0,0 +1,16 @@
+(call
+ target: (identifier) @context
+ (arguments (alias) @name)
+ (#match? @context "^(defmodule|defprotocol)$")) @item
+
+(call
+ target: (identifier) @context
+ (arguments
+ [
+ (identifier) @name
+ (call target: (identifier) @name)
+ (binary_operator
+ left: (call target: (identifier) @name)
+ operator: "when")
+ ])
+ (#match? @context "^(def|defp|defdelegate|defguard|defguardp|defmacro|defmacrop|defn|defnp)$")) @item