Introduce a new capture in the outline query called 'context.extra', which causes text to appear in the outline, but not in the breadcrumbs.
27 lines
723 B
Scheme
27 lines
723 B
Scheme
(call
|
|
target: (identifier) @context
|
|
(arguments (alias) @name)
|
|
(#match? @context "^(defmodule|defprotocol)$")) @item
|
|
|
|
(call
|
|
target: (identifier) @context
|
|
(arguments
|
|
[
|
|
(identifier) @name
|
|
(call
|
|
target: (identifier) @name
|
|
(arguments
|
|
"(" @context.extra
|
|
_* @context.extra
|
|
")" @context.extra))
|
|
(binary_operator
|
|
left: (call
|
|
target: (identifier) @name
|
|
(arguments
|
|
"(" @context.extra
|
|
_* @context.extra
|
|
")" @context.extra))
|
|
operator: "when")
|
|
])
|
|
(#match? @context "^(def|defp|defdelegate|defguard|defguardp|defmacro|defmacrop|defn|defnp)$")) @item
|