aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordavidroeca <david.roeca@gmail.com>2020-10-20 14:11:19 -0400
committerKiyan Yazdani <yazdani.kiyan@protonmail.com>2020-10-23 22:53:23 +0200
commitf925408640bd7be24c3c5d1eec1a4a46f3fb438f (patch)
tree615df4a1a6540ae850778c5345428c22c8b9364c
parenthandle jsx components with dot in them (diff)
downloadnvim-treesitter-f925408640bd7be24c3c5d1eec1a4a46f3fb438f.tar
nvim-treesitter-f925408640bd7be24c3c5d1eec1a4a46f3fb438f.tar.gz
nvim-treesitter-f925408640bd7be24c3c5d1eec1a4a46f3fb438f.tar.bz2
nvim-treesitter-f925408640bd7be24c3c5d1eec1a4a46f3fb438f.tar.lz
nvim-treesitter-f925408640bd7be24c3c5d1eec1a4a46f3fb438f.tar.xz
nvim-treesitter-f925408640bd7be24c3c5d1eec1a4a46f3fb438f.tar.zst
nvim-treesitter-f925408640bd7be24c3c5d1eec1a4a46f3fb438f.zip
use for first identifier in jsx nested_identifier
-rw-r--r--queries/jsx/highlights.scm6
1 files changed, 3 insertions, 3 deletions
diff --git a/queries/jsx/highlights.scm b/queries/jsx/highlights.scm
index ba3e44a55..e8aaffdda 100644
--- a/queries/jsx/highlights.scm
+++ b/queries/jsx/highlights.scm
@@ -18,19 +18,19 @@
(#match? @type "^[A-Z]")))
; 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
(#match? @type "^[A-Z]")))
; 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
(#match? @type "^[A-Z]")))
; 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
(#match? @type "^[A-Z]")))