summaryrefslogtreecommitdiff
path: root/queries/ecma
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2021-11-18 09:51:03 +0000
committerStephan Seitz <stephan.seitz@fau.de>2021-11-23 10:02:06 +0100
commit011ac894ec5b9e36563d8629fb7734f43ddb27a8 (patch)
treede0b252b7705bfa4304c08cd389fed0814ae6f1c /queries/ecma
parent89fbb9b39e9ff4049c797397721d44facbd246df (diff)
Prefer lua-match over match
as string.find is much quicker than vim.regex:match*
Diffstat (limited to 'queries/ecma')
-rw-r--r--queries/ecma/highlights.scm6
1 files changed, 3 insertions, 3 deletions
diff --git a/queries/ecma/highlights.scm b/queries/ecma/highlights.scm
index 8bc2c0c8..1e43c7f6 100644
--- a/queries/ecma/highlights.scm
+++ b/queries/ecma/highlights.scm
@@ -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)$"))