aboutsummaryrefslogtreecommitdiffstats
path: root/queries/elixir
diff options
context:
space:
mode:
authorStephen Bolton <stephen@bitsonthemind.com>2023-02-05 15:56:46 -0500
committerAmaan Qureshi <amaanq12@gmail.com>2023-02-24 17:50:17 -0500
commita744ed1b274b586a00dcb39dc0da7ba264758efb (patch)
treeed507ccde626f08d6d305b20aa3551de2c9444b2 /queries/elixir
parentfeat: add bicep (diff)
downloadnvim-treesitter-a744ed1b274b586a00dcb39dc0da7ba264758efb.tar
nvim-treesitter-a744ed1b274b586a00dcb39dc0da7ba264758efb.tar.gz
nvim-treesitter-a744ed1b274b586a00dcb39dc0da7ba264758efb.tar.bz2
nvim-treesitter-a744ed1b274b586a00dcb39dc0da7ba264758efb.tar.lz
nvim-treesitter-a744ed1b274b586a00dcb39dc0da7ba264758efb.tar.xz
nvim-treesitter-a744ed1b274b586a00dcb39dc0da7ba264758efb.tar.zst
nvim-treesitter-a744ed1b274b586a00dcb39dc0da7ba264758efb.zip
Fix elixir `@function` captures
When viewing the previous rule in the `TSPlayground` the `@function` captures were not actually matching. This led all functions to get the `@function.call` group applied to them. This change makes it so that the capture now works and where functions are defined will get the `@function` group.
Diffstat (limited to 'queries/elixir')
-rw-r--r--queries/elixir/highlights.scm7
1 files changed, 4 insertions, 3 deletions
diff --git a/queries/elixir/highlights.scm b/queries/elixir/highlights.scm
index c3aee40c7..d87afcf1b 100644
--- a/queries/elixir/highlights.scm
+++ b/queries/elixir/highlights.scm
@@ -111,9 +111,10 @@
"defp"
"defprotocol"
"defstruct"
-)) (arguments [
- (identifier) @function
- (binary_operator left: (identifier) @function operator: "when")])?)
+ ))
+ (arguments [
+ (call (identifier) @function)
+ (binary_operator left: (call target: (identifier) @function) operator: "when")])?)
; Kernel Keywords & Special Forms
(call target: ((identifier) @keyword (#any-of? @keyword