mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 17:55:01 +00:00
refactor: Update elixir-tags.scm to use more specific @name.reference and @name.definition tags
This commit is contained in:
parent
08a75808df
commit
865f71e2cc
1 changed files with 8 additions and 8 deletions
|
@ -3,7 +3,7 @@
|
||||||
; * modules and protocols
|
; * modules and protocols
|
||||||
(call
|
(call
|
||||||
target: (identifier) @ignore
|
target: (identifier) @ignore
|
||||||
(arguments (alias) @name)
|
(arguments (alias) @name.definition.module)
|
||||||
(#any-of? @ignore "defmodule" "defprotocol")) @definition.module
|
(#any-of? @ignore "defmodule" "defprotocol")) @definition.module
|
||||||
|
|
||||||
; * functions/macros
|
; * functions/macros
|
||||||
|
@ -12,12 +12,12 @@
|
||||||
(arguments
|
(arguments
|
||||||
[
|
[
|
||||||
; zero-arity functions with no parentheses
|
; zero-arity functions with no parentheses
|
||||||
(identifier) @name
|
(identifier) @name.definition.function
|
||||||
; regular function clause
|
; regular function clause
|
||||||
(call target: (identifier) @name)
|
(call target: (identifier) @name.definition.function)
|
||||||
; function clause with a guard clause
|
; function clause with a guard clause
|
||||||
(binary_operator
|
(binary_operator
|
||||||
left: (call target: (identifier) @name)
|
left: (call target: (identifier) @name.definition.function)
|
||||||
operator: "when")
|
operator: "when")
|
||||||
])
|
])
|
||||||
(#any-of? @ignore "def" "defp" "defdelegate" "defguard" "defguardp" "defmacro" "defmacrop" "defn" "defnp")) @definition.function
|
(#any-of? @ignore "def" "defp" "defdelegate" "defguard" "defguardp" "defmacro" "defmacrop" "defn" "defnp")) @definition.function
|
||||||
|
@ -39,16 +39,16 @@
|
||||||
(call
|
(call
|
||||||
target: [
|
target: [
|
||||||
; local
|
; local
|
||||||
(identifier) @name
|
(identifier) @name.reference.call
|
||||||
; remote
|
; remote
|
||||||
(dot
|
(dot
|
||||||
right: (identifier) @name)
|
right: (identifier) @name.reference.call)
|
||||||
]) @reference.call
|
]) @reference.call
|
||||||
|
|
||||||
; * pipe into function call
|
; * pipe into function call
|
||||||
(binary_operator
|
(binary_operator
|
||||||
operator: "|>"
|
operator: "|>"
|
||||||
right: (identifier) @name) @reference.call
|
right: (identifier) @name.reference.call) @reference.call
|
||||||
|
|
||||||
; * modules
|
; * modules
|
||||||
(alias) @name @reference.module
|
(alias) @name.reference.module @reference.module
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue