mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-30 14:17:02 +00:00
Fix lua highlight query
* Fix regex predicate on constants. * Remove 'function.call' highlight name. In other languages, we differentiate calls from definitions with the 'function.definition' highlight name. We actually don't use this in any themes though.
This commit is contained in:
parent
aba2914a31
commit
0867162c87
1 changed files with 11 additions and 5 deletions
|
@ -137,7 +137,7 @@
|
|||
;; Constants
|
||||
|
||||
((identifier) @constant
|
||||
(#lua-match? @constant "^[A-Z][A-Z_0-9]*$"))
|
||||
(#match? @constant "^[A-Z][A-Z_0-9]*$"))
|
||||
|
||||
(vararg_expression) @constant
|
||||
|
||||
|
@ -164,11 +164,17 @@
|
|||
|
||||
(parameters (identifier) @parameter)
|
||||
|
||||
(function_call name: (identifier) @function.call)
|
||||
(function_declaration name: (identifier) @function)
|
||||
(function_call
|
||||
name: [
|
||||
(identifier) @function
|
||||
(dot_index_expression field: (identifier) @function)
|
||||
])
|
||||
|
||||
(function_call name: (dot_index_expression field: (identifier) @function.call))
|
||||
(function_declaration name: (dot_index_expression field: (identifier) @function))
|
||||
(function_declaration
|
||||
name: [
|
||||
(identifier) @function.definition
|
||||
(dot_index_expression field: (identifier) @function.definition)
|
||||
])
|
||||
|
||||
(method_index_expression method: (identifier) @method)
|
||||
|
||||
|
|
Loading…
Reference in a new issue