mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-20 12:20:02 -04:00
feat(typescript): add various missing function/method captures
This commit is contained in:
parent
9db3769c4b
commit
87cf2abeb6
1 changed files with 18 additions and 0 deletions
|
|
@ -66,6 +66,7 @@
|
||||||
|
|
||||||
"?." @punctuation.delimiter
|
"?." @punctuation.delimiter
|
||||||
|
|
||||||
|
(method_signature "?" @punctuation.special)
|
||||||
(property_signature "?" @punctuation.special)
|
(property_signature "?" @punctuation.special)
|
||||||
(optional_parameter "?" @punctuation.special)
|
(optional_parameter "?" @punctuation.special)
|
||||||
|
|
||||||
|
|
@ -104,3 +105,20 @@
|
||||||
;; a => null
|
;; a => null
|
||||||
(arrow_function
|
(arrow_function
|
||||||
parameter: (identifier) @parameter)
|
parameter: (identifier) @parameter)
|
||||||
|
|
||||||
|
;; function signatures
|
||||||
|
(ambient_declaration
|
||||||
|
(function_signature
|
||||||
|
name: (identifier) @function))
|
||||||
|
|
||||||
|
;; method signatures
|
||||||
|
(method_signature name: (_) @method)
|
||||||
|
|
||||||
|
;; property signatures
|
||||||
|
(property_signature
|
||||||
|
name: (property_identifier) @method
|
||||||
|
type: (type_annotation
|
||||||
|
[
|
||||||
|
(union_type (parenthesized_type (function_type)))
|
||||||
|
(function_type)
|
||||||
|
]))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue