1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-27 12:00:04 +08:00
SpaceVim/bundle/nvim-treesitter/queries/javascript/highlights.scm
2022-04-14 12:01:23 +08:00

34 lines
634 B
Scheme
Vendored

; inherits: ecma,jsx
;;; Parameters
(formal_parameters (identifier) @parameter)
(formal_parameters
(rest_pattern
(identifier) @parameter))
;; ({ a }) => null
(formal_parameters
(object_pattern
(shorthand_property_identifier_pattern) @parameter))
;; ({ a: b }) => null
(formal_parameters
(object_pattern
(pair_pattern
value: (identifier) @parameter)))
;; ([ a ]) => null
(formal_parameters
(array_pattern
(identifier) @parameter))
;; a => null
(arrow_function
parameter: (identifier) @parameter)
;; optional parameters
(formal_parameters
(assignment_pattern
left: (identifier) @parameter))