aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergio Alejandro Vargas <savargasqu+git@unal.edu.co>2021-07-20 21:29:16 -0500
committerThomas Vigouroux <tomvig38@gmail.com>2021-08-02 15:52:56 +0200
commit0ed69e50a8a80e46992cb0fb7bfbaf843e88636e (patch)
tree99ef6a7e5479d96ac1f48c47290f51b2366f7f49
parentUpdate lockfile.json (diff)
downloadnvim-treesitter-0ed69e50a8a80e46992cb0fb7bfbaf843e88636e.tar
nvim-treesitter-0ed69e50a8a80e46992cb0fb7bfbaf843e88636e.tar.gz
nvim-treesitter-0ed69e50a8a80e46992cb0fb7bfbaf843e88636e.tar.bz2
nvim-treesitter-0ed69e50a8a80e46992cb0fb7bfbaf843e88636e.tar.lz
nvim-treesitter-0ed69e50a8a80e46992cb0fb7bfbaf843e88636e.tar.xz
nvim-treesitter-0ed69e50a8a80e46992cb0fb7bfbaf843e88636e.tar.zst
nvim-treesitter-0ed69e50a8a80e46992cb0fb7bfbaf843e88636e.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.
-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