mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-11 07:50:07 -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
|
|
@ -102,7 +102,7 @@
|
|||
])
|
||||
|
||||
((word) @number
|
||||
(#match? @number "^[0-9]+$"))
|
||||
(#lua-match? @number "^[0-9]+$"))
|
||||
|
||||
(file_redirect
|
||||
descriptor: (file_descriptor) @operator
|
||||
|
|
@ -114,7 +114,7 @@
|
|||
(variable_name) @variable
|
||||
|
||||
((variable_name) @constant
|
||||
(#match? @constant "^[A-Z][A-Z_0-9]*$"))
|
||||
(#lua-match? @constant "^[A-Z][A-Z_0-9]*$"))
|
||||
|
||||
(case_item
|
||||
value: (word) @parameter)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue