mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-15 09:50:04 -04:00
feat(typescript): highlight decorators, default case, global declaration
This commit is contained in:
parent
f6c52eb839
commit
44211e7f6e
2 changed files with 9 additions and 0 deletions
|
|
@ -158,6 +158,11 @@
|
||||||
(namespace_import
|
(namespace_import
|
||||||
(identifier) @namespace)
|
(identifier) @namespace)
|
||||||
|
|
||||||
|
; Decorators
|
||||||
|
;----------
|
||||||
|
(decorator "@" @attribute (identifier) @attribute)
|
||||||
|
(decorator "@" @attribute (call_expression (identifier) @attribute))
|
||||||
|
|
||||||
; Literals
|
; Literals
|
||||||
;---------
|
;---------
|
||||||
|
|
||||||
|
|
@ -210,6 +215,7 @@
|
||||||
(pair ":" @punctuation.delimiter)
|
(pair ":" @punctuation.delimiter)
|
||||||
(pair_pattern ":" @punctuation.delimiter)
|
(pair_pattern ":" @punctuation.delimiter)
|
||||||
(switch_case ":" @punctuation.delimiter)
|
(switch_case ":" @punctuation.delimiter)
|
||||||
|
(switch_default ":" @punctuation.delimiter)
|
||||||
|
|
||||||
[
|
[
|
||||||
"--"
|
"--"
|
||||||
|
|
|
||||||
|
|
@ -136,6 +136,9 @@
|
||||||
(arrow_function
|
(arrow_function
|
||||||
parameter: (identifier) @parameter)
|
parameter: (identifier) @parameter)
|
||||||
|
|
||||||
|
;; global declaration
|
||||||
|
(ambient_declaration "global" @namespace)
|
||||||
|
|
||||||
;; function signatures
|
;; function signatures
|
||||||
(ambient_declaration
|
(ambient_declaration
|
||||||
(function_signature
|
(function_signature
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue