mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-17 10:50:06 -04:00
Locals matching "when" operator, add pipe queries
This commit is contained in:
parent
25b28f6185
commit
725ef8fc18
2 changed files with 95 additions and 62 deletions
|
|
@ -86,16 +86,16 @@
|
|||
(stab_clause
|
||||
operator: _ @operator)
|
||||
|
||||
; Calling a local function
|
||||
; Local Function Calls
|
||||
(call target: (identifier) @function)
|
||||
|
||||
; Calling a remote function
|
||||
; Remove Function Calls
|
||||
(call target: (dot left: [
|
||||
(atom) @type
|
||||
(_)
|
||||
] right: (identifier) @function) (arguments))
|
||||
|
||||
; Calling a local def function
|
||||
; Definition Function Calls
|
||||
(call target: ((identifier) @keyword.function (#any-of? @keyword.function
|
||||
"def"
|
||||
"defdelegate"
|
||||
|
|
@ -142,7 +142,7 @@
|
|||
"with"
|
||||
)))
|
||||
|
||||
; Special constants
|
||||
; Special Constants
|
||||
((identifier) @constant.builtin (#any-of? @constant.builtin
|
||||
"__CALLER__"
|
||||
"__DIR__"
|
||||
|
|
@ -182,6 +182,11 @@
|
|||
)
|
||||
])
|
||||
|
||||
; Pipe Operator
|
||||
(binary_operator
|
||||
operator: "|>"
|
||||
right: (identifier) @function)
|
||||
|
||||
; Module attributes
|
||||
(unary_operator
|
||||
operator: "@" @constant
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue