mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-09 06:50:06 -04:00
Prefer lua-match over match
as string.find is much quicker than vim.regex:match*
This commit is contained in:
parent
89fbb9b39e
commit
011ac894ec
20 changed files with 67 additions and 67 deletions
|
|
@ -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)
|
||||
.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue