Prefer lua-match over match

as string.find is much quicker than vim.regex:match*
This commit is contained in:
Lewis Russell 2021-11-18 09:51:03 +00:00 committed by Stephan Seitz
parent 89fbb9b39e
commit 011ac894ec
20 changed files with 67 additions and 67 deletions

View file

@ -95,10 +95,10 @@
((field_access
object: (identifier) @type)
(#match? @type "^[A-Z]"))
(#lua-match? @type "^[A-Z]"))
((scoped_identifier
scope: (identifier) @type)
(#match? @type "^[A-Z]"))
(#lua-match? @type "^[A-Z]"))
; Fields
@ -118,7 +118,7 @@
; Variables
((identifier) @constant
(#match? @constant "^[A-Z_][A-Z\d_]+$"))
(#lua-match? @constant "^[A-Z_][A-Z%d_]+$"))
(this) @variable.builtin