Skip to content

Commit c6e542e

Browse files
ymarcomeain
authored andcommitted
lua: annotate labels, properties and methods
1 parent 055c82e commit c6e542e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

queries/lua/highlights.scm

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,9 @@
148148

149149
;; Tables
150150

151-
(field name: (identifier) @variable)
151+
(field name: (identifier) @label)
152152

153-
(dot_index_expression field: (identifier) @variable)
153+
(dot_index_expression field: (identifier) @property)
154154

155155
(table_constructor
156156
[
@@ -167,8 +167,9 @@
167167

168168
(function_call name: (dot_index_expression field: (identifier) @function))
169169
(function_declaration name: (dot_index_expression field: (identifier) @function))
170+
(function_call name: (method_index_expression method: [(identifier) @property
171+
(identifier) @method.call]))
170172

171-
(method_index_expression method: (identifier) @method)
172173

173174
(function_call
174175
(identifier) @function.builtin

0 commit comments

Comments
 (0)