aboutsummaryrefslogtreecommitdiffstats
path: root/queries/lua
diff options
context:
space:
mode:
authorThomas Vigouroux <tomvig38@gmail.com>2021-04-22 17:15:34 +0200
committerStephan Seitz <stephan.lauf@yahoo.de>2021-04-22 17:51:43 +0200
commitf0ab5edab980a142c4affef06af8ee134451568c (patch)
tree9f21dbd6f9565731ad3d908efd8ca5e72a9f4a65 /queries/lua
parentfix(highlights): always highlight ternary operator as operator (diff)
downloadnvim-treesitter-f0ab5edab980a142c4affef06af8ee134451568c.tar
nvim-treesitter-f0ab5edab980a142c4affef06af8ee134451568c.tar.gz
nvim-treesitter-f0ab5edab980a142c4affef06af8ee134451568c.tar.bz2
nvim-treesitter-f0ab5edab980a142c4affef06af8ee134451568c.tar.lz
nvim-treesitter-f0ab5edab980a142c4affef06af8ee134451568c.tar.xz
nvim-treesitter-f0ab5edab980a142c4affef06af8ee134451568c.tar.zst
nvim-treesitter-f0ab5edab980a142c4affef06af8ee134451568c.zip
fix(lua): correctly highlight field names
Diffstat (limited to 'queries/lua')
-rw-r--r--queries/lua/highlights.scm3
1 files changed, 2 insertions, 1 deletions
diff --git a/queries/lua/highlights.scm b/queries/lua/highlights.scm
index d3a778d37..50f14561a 100644
--- a/queries/lua/highlights.scm
+++ b/queries/lua/highlights.scm
@@ -138,7 +138,8 @@
(string) @string
(number) @number
(label_statement) @label
-(field (identifier) @field)
+; A bit of a tricky one, this will only match field names
+(field . (identifier) @field (_))
(shebang) @comment
;; Error