aboutsummaryrefslogtreecommitdiffstats
path: root/queries
diff options
context:
space:
mode:
authorSergio Alejandro Vargas <savargasqu+git@unal.edu.co>2021-07-20 21:29:16 -0500
committerStephan Seitz <stephan.seitz@fau.de>2021-09-17 21:06:36 +0200
commite29bf132dd27a0944c112f098d71848be074a4af (patch)
tree99ef6a7e5479d96ac1f48c47290f51b2366f7f49 /queries
parentUpdate lockfile.json (diff)
downloadnvim-treesitter-e29bf132dd27a0944c112f098d71848be074a4af.tar
nvim-treesitter-e29bf132dd27a0944c112f098d71848be074a4af.tar.gz
nvim-treesitter-e29bf132dd27a0944c112f098d71848be074a4af.tar.bz2
nvim-treesitter-e29bf132dd27a0944c112f098d71848be074a4af.tar.lz
nvim-treesitter-e29bf132dd27a0944c112f098d71848be074a4af.tar.xz
nvim-treesitter-e29bf132dd27a0944c112f098d71848be074a4af.tar.zst
nvim-treesitter-e29bf132dd27a0944c112f098d71848be074a4af.zip
highlights(lua): Fix method calls
The usual `function_call` query would highlight the objects at the beginning of a method call. The `method` query has to account for this, and highlight the identifier as a variable again.
Diffstat (limited to 'queries')
-rw-r--r--queries/lua/highlights.scm2
1 files changed, 1 insertions, 1 deletions
diff --git a/queries/lua/highlights.scm b/queries/lua/highlights.scm
index 290f709ce..66e0efe3f 100644
--- a/queries/lua/highlights.scm
+++ b/queries/lua/highlights.scm
@@ -131,9 +131,9 @@
(function_definition ["function" "end"] @keyword.function)
(property_identifier) @property
-(method) @method
(function_call (identifier) @function . (arguments))
+(function_call [(identifier) @variable (_)] (method) @method . (arguments))
(function_call (field_expression (property_identifier) @function) . (arguments))
;; Parameters