mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-18 03:10:04 -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
|
|
@ -20,13 +20,13 @@
|
|||
;--------------------
|
||||
|
||||
((identifier) @constructor
|
||||
(#match? @constructor "^[A-Z]"))
|
||||
(#lua-match? @constructor "^[A-Z]"))
|
||||
|
||||
((identifier) @constant
|
||||
(#vim-match? @constant "^[A-Z_][A-Z\\d_]+$"))
|
||||
(#lua-match? @constant "^[A-Z_][A-Z%d_]+$"))
|
||||
|
||||
((shorthand_property_identifier) @constant
|
||||
(#vim-match? @constant "^[A-Z_][A-Z\\d_]+$"))
|
||||
(#lua-match? @constant "^[A-Z_][A-Z%d_]+$"))
|
||||
|
||||
((identifier) @variable.builtin
|
||||
(#vim-match? @variable.builtin "^(arguments|module|console|window|document)$"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue