mirror of
https://github.com/chenasraf/vim-matchup.git
synced 2026-05-18 01:38:57 +00:00
feat: improve tsx support (#420)
jsx tags may not always have an `identifier` as their name (e.g. they could have `foo.bar` as a name, which gets parsed as a `member_expression`)
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
(jsx_element) @scope.tag
|
||||
|
||||
(jsx_opening_element
|
||||
(identifier) @open.tag)
|
||||
name: (_) @open.tag)
|
||||
|
||||
(jsx_closing_element
|
||||
(identifier) @close.tag
|
||||
(#offset! @close.tag 0 -1 0 0))
|
||||
name: (_) @close.tag)
|
||||
|
||||
(jsx_self_closing_element
|
||||
name: (identifier) @open.selftag
|
||||
name: (_) @open.selftag
|
||||
"/>" @close.selftag) @scope.selftag
|
||||
|
||||
Reference in New Issue
Block a user