mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-02 11:36:54 -04:00
feat!: drop modules, general refactor and cleanup
This commit is contained in:
parent
c13e28f894
commit
2c8f2f2fad
829 changed files with 4905 additions and 8010 deletions
55
runtime/queries/javascript/highlights.scm
Normal file
55
runtime/queries/javascript/highlights.scm
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
; 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
|
||||
(object_assignment_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 } = { a }) => null
|
||||
(formal_parameters
|
||||
(assignment_pattern
|
||||
(object_pattern
|
||||
(shorthand_property_identifier_pattern) @parameter)))
|
||||
|
||||
;; ({ a = b } = { a }) => null
|
||||
(formal_parameters
|
||||
(assignment_pattern
|
||||
(object_pattern
|
||||
(object_assignment_pattern
|
||||
(shorthand_property_identifier_pattern) @parameter))))
|
||||
|
||||
;; a => null
|
||||
(arrow_function
|
||||
parameter: (identifier) @parameter)
|
||||
|
||||
;; optional parameters
|
||||
(formal_parameters
|
||||
(assignment_pattern
|
||||
left: (identifier) @parameter))
|
||||
|
||||
;; punctuation
|
||||
(optional_chain) @punctuation.delimiter
|
||||
Loading…
Add table
Add a link
Reference in a new issue