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

@ -55,7 +55,7 @@
; Used in destructure pattern
((sym_lit) @parameter
(#match? @parameter "^[&]"))
(#lua-match? @parameter "^[&]"))
; Inline function variables
((sym_lit) @variable.builtin
@ -106,7 +106,7 @@
; Definition functions
((sym_lit) @keyword
(#match? @keyword "^def.*$"))
(#lua-match? @keyword "^def.*$"))
((sym_lit) @keyword
(#eq? @keyword "declare"))
((sym_lit) @keyword.function
@ -283,7 +283,7 @@
(list_lit
.
(sym_lit) @_keyword ; Don't really want to highlight twice
(#match? @_keyword "^def.*")
(#lua-match? @_keyword "^def.*")
.
(sym_lit)
.