mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-17 19:00:02 -04:00
Merge pull request #612 from JoosepAlviste/master
fix(javascript): fix constant variable highlight
This commit is contained in:
commit
2a578e20c2
1 changed files with 3 additions and 3 deletions
|
|
@ -17,15 +17,15 @@
|
||||||
|
|
||||||
(identifier) @variable
|
(identifier) @variable
|
||||||
|
|
||||||
|
((identifier) @constructor
|
||||||
|
(#match? @constructor "^[A-Z]"))
|
||||||
|
|
||||||
((identifier) @constant
|
((identifier) @constant
|
||||||
(#vim-match? @constant "^[A-Z_][A-Z\\d_]+$"))
|
(#vim-match? @constant "^[A-Z_][A-Z\\d_]+$"))
|
||||||
|
|
||||||
((shorthand_property_identifier) @constant
|
((shorthand_property_identifier) @constant
|
||||||
(#vim-match? @constant "^[A-Z_][A-Z\\d_]+$"))
|
(#vim-match? @constant "^[A-Z_][A-Z\\d_]+$"))
|
||||||
|
|
||||||
((identifier) @constructor
|
|
||||||
(#match? @constructor "^[A-Z]"))
|
|
||||||
|
|
||||||
((identifier) @variable.builtin
|
((identifier) @variable.builtin
|
||||||
(#vim-match? @variable.builtin "^(arguments|module|console|window|document)$"))
|
(#vim-match? @variable.builtin "^(arguments|module|console|window|document)$"))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue