Skip to content

Commit

Permalink
Merge pull request #250 from tmillr/main
Browse files Browse the repository at this point in the history
fix: lua function declaration name highlighting
  • Loading branch information
ful1e5 authored Sep 23, 2023
2 parents 26a72e2 + 5e4068f commit dcc1e34
Showing 1 changed file with 106 additions and 0 deletions.
106 changes: 106 additions & 0 deletions queries/lua/highlights.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
(function_declaration
name: [
(dot_index_expression
table: [
(identifier)
;; some manual recursion (up to 8 fields) because ts queries don't
;; support recursion up to arbitrary depths currently
(dot_index_expression
table: [
(identifier)
(dot_index_expression
table: [
(identifier)
(dot_index_expression
table: [
(identifier)
(dot_index_expression
table: [
(identifier)
(dot_index_expression
table: [
(identifier)
(dot_index_expression
table: [
(identifier)
(dot_index_expression
table: [
(identifier)
(dot_index_expression)
] @function.namespace
"." @function.punctuation.delimiter
field: (identifier) @function.namespace)
] @function.namespace
"." @function.punctuation.delimiter
field: (identifier) @function.namespace)
] @function.namespace
"." @function.punctuation.delimiter
field: (identifier) @function.namespace)
] @function.namespace
"." @function.punctuation.delimiter
field: (identifier) @function.namespace)
] @function.namespace
"." @function.punctuation.delimiter
field: (identifier) @function.namespace)
] @function.namespace
"." @function.punctuation.delimiter
field: (identifier) @function.namespace)
] @function.namespace
"." @function.punctuation.delimiter
field: (identifier) @function.namespace)
] @function.namespace
"." @function.punctuation.delimiter
field: (identifier) @function)

(method_index_expression
table: [
(identifier)
;; some manual recursion (up to 8 fields) because ts queries don't
;; support recursion up to arbitrary depths currently
(dot_index_expression
table: [
(identifier)
(dot_index_expression
table: [
(identifier)
(dot_index_expression
table: [
(identifier)
(dot_index_expression
table: [
(identifier)
(dot_index_expression
table: [
(identifier)
(dot_index_expression
table: [
(identifier)
(dot_index_expression
table: [
(identifier)
(dot_index_expression)
] @method.namespace
"." @function.punctuation.delimiter
field: (identifier) @method.namespace)
] @method.namespace
"." @function.punctuation.delimiter
field: (identifier) @method.namespace)
] @method.namespace
"." @function.punctuation.delimiter
field: (identifier) @method.namespace)
] @method.namespace
"." @function.punctuation.delimiter
field: (identifier) @method.namespace)
] @method.namespace
"." @function.punctuation.delimiter
field: (identifier) @method.namespace)
] @method.namespace
"." @function.punctuation.delimiter
field: (identifier) @method.namespace)
] @method.namespace
"." @function.punctuation.delimiter
field: (identifier) @method.namespace)
] @method.namespace
":" @method.punctuation.delimiter
method: (identifier) @method)
])

0 comments on commit dcc1e34

Please sign in to comment.