mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-16 10:20:11 -04:00
use for first identifier in jsx nested_identifier
This commit is contained in:
parent
dafe947ecd
commit
f925408640
1 changed files with 3 additions and 3 deletions
|
|
@ -18,19 +18,19 @@
|
||||||
(#match? @type "^[A-Z]")))
|
(#match? @type "^[A-Z]")))
|
||||||
|
|
||||||
; Handle the dot operator effectively - <My.Component>
|
; Handle the dot operator effectively - <My.Component>
|
||||||
(jsx_opening_element ((nested_identifier (identifier) @type (identifier) @type)))
|
(jsx_opening_element ((nested_identifier (identifier) @tag (identifier) @type)))
|
||||||
|
|
||||||
(jsx_closing_element ((identifier) @type
|
(jsx_closing_element ((identifier) @type
|
||||||
(#match? @type "^[A-Z]")))
|
(#match? @type "^[A-Z]")))
|
||||||
|
|
||||||
; Handle the dot operator effectively - </My.Component>
|
; Handle the dot operator effectively - </My.Component>
|
||||||
(jsx_closing_element ((nested_identifier (identifier) @type (identifier) @type)))
|
(jsx_closing_element ((nested_identifier (identifier) @tag (identifier) @type)))
|
||||||
|
|
||||||
(jsx_self_closing_element ((identifier) @type
|
(jsx_self_closing_element ((identifier) @type
|
||||||
(#match? @type "^[A-Z]")))
|
(#match? @type "^[A-Z]")))
|
||||||
|
|
||||||
; Handle the dot operator effectively - <My.Component />
|
; Handle the dot operator effectively - <My.Component />
|
||||||
(jsx_self_closing_element ((nested_identifier (identifier) @type (identifier) @type)))
|
(jsx_self_closing_element ((nested_identifier (identifier) @tag (identifier) @type)))
|
||||||
|
|
||||||
(variable_declarator ((identifier) @type
|
(variable_declarator ((identifier) @type
|
||||||
(#match? @type "^[A-Z]")))
|
(#match? @type "^[A-Z]")))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue