Add Elixir symbols in outline view (#8761)
Release Notes: - Improved: Add `@callback`, `@type` and `@typep` Elixir symbols in outline view https://github.com/zed-industries/zed/assets/14976415/208d3def-f49e-41e0-a306-fb8e00317e6b
This commit is contained in:
parent
b50f86735f
commit
467a179837
1 changed files with 20 additions and 0 deletions
|
@ -3,6 +3,26 @@
|
||||||
(arguments (alias) @name)
|
(arguments (alias) @name)
|
||||||
(#match? @context "^(defmodule|defprotocol)$")) @item
|
(#match? @context "^(defmodule|defprotocol)$")) @item
|
||||||
|
|
||||||
|
(unary_operator
|
||||||
|
operator: "@" @name
|
||||||
|
operand: (call
|
||||||
|
target: (identifier) @context
|
||||||
|
(arguments
|
||||||
|
[
|
||||||
|
(binary_operator
|
||||||
|
left: (identifier) @name)
|
||||||
|
(binary_operator
|
||||||
|
left: (call
|
||||||
|
target: (identifier) @name
|
||||||
|
(arguments
|
||||||
|
"(" @context.extra
|
||||||
|
_* @context.extra
|
||||||
|
")" @context.extra)))
|
||||||
|
]
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(#match? @context "^(callback|type|typep)$")) @item
|
||||||
|
|
||||||
(call
|
(call
|
||||||
target: (identifier) @context
|
target: (identifier) @context
|
||||||
(arguments
|
(arguments
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue