feat(repo_map): add elixir support (#894)
This commit is contained in:
21
crates/avante-repo-map/queries/tree-sitter-elixir-defs.scm
Normal file
21
crates/avante-repo-map/queries/tree-sitter-elixir-defs.scm
Normal file
@@ -0,0 +1,21 @@
|
||||
; * modules and protocols
|
||||
(call
|
||||
target: (identifier) @ignore
|
||||
(arguments (alias) @class)
|
||||
(#match? @ignore "^(defmodule|defprotocol)$"))
|
||||
|
||||
; * functions
|
||||
(call
|
||||
target: (identifier) @ignore
|
||||
(arguments
|
||||
[
|
||||
; zero-arity functions with no parentheses
|
||||
(identifier) @method
|
||||
; regular function clause
|
||||
(call target: (identifier) @method)
|
||||
; function clause with a guard clause
|
||||
(binary_operator
|
||||
left: (call target: (identifier) @method)
|
||||
operator: "when")
|
||||
])
|
||||
(#match? @ignore "^(def|defdelegate|defguard|defn)$"))
|
||||
Reference in New Issue
Block a user