fix(javascript): fix constant variable highlight

The `@constant` query gets overwritten by the `@constructor` query. They
both query for variables starting with an uppercase letter, but the
`@constant` query took effect first.
This commit is contained in:
Joosep Alviste 2020-10-23 22:05:27 +03:00
parent d1796695ac
commit 31fca67839

View file

@ -17,15 +17,15 @@
(identifier) @variable
((identifier) @constructor
(#match? @constructor "^[A-Z]"))
((identifier) @constant
(#vim-match? @constant "^[A-Z_][A-Z\\d_]+$"))
((shorthand_property_identifier) @constant
(#vim-match? @constant "^[A-Z_][A-Z\\d_]+$"))
((identifier) @constructor
(#match? @constructor "^[A-Z]"))
((identifier) @variable.builtin
(#vim-match? @variable.builtin "^(arguments|module|console|window|document)$"))