mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-18 19:30:02 -04:00
highlights(ecma): limit constructor highlight
This commit is contained in:
parent
a8ced4ce8b
commit
0e6d4b4172
1 changed files with 8 additions and 2 deletions
|
|
@ -20,8 +20,8 @@
|
||||||
; Special identifiers
|
; Special identifiers
|
||||||
;--------------------
|
;--------------------
|
||||||
|
|
||||||
((identifier) @constructor
|
((identifier) @type
|
||||||
(#lua-match? @constructor "^[A-Z]"))
|
(#lua-match? @type "^[A-Z]"))
|
||||||
|
|
||||||
((identifier) @constant
|
((identifier) @constant
|
||||||
(#lua-match? @constant "^[A-Z_][A-Z%d_]+$"))
|
(#lua-match? @constant "^[A-Z_][A-Z%d_]+$"))
|
||||||
|
|
@ -89,6 +89,12 @@
|
||||||
function: (member_expression
|
function: (member_expression
|
||||||
property: [(property_identifier) (private_property_identifier)] @method.call))
|
property: [(property_identifier) (private_property_identifier)] @method.call))
|
||||||
|
|
||||||
|
; Constructor
|
||||||
|
;------------
|
||||||
|
|
||||||
|
(new_expression
|
||||||
|
constructor: (identifier) @constructor)
|
||||||
|
|
||||||
; Variables
|
; Variables
|
||||||
;----------
|
;----------
|
||||||
(namespace_import
|
(namespace_import
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue