aboutsummaryrefslogtreecommitdiffstats
path: root/queries/jsx
diff options
context:
space:
mode:
authornapmn <lukass135@gmail.com>2021-06-03 10:07:13 +0200
committerKiyan <yazdani.kiyan@protonmail.com>2021-06-04 08:30:16 +0200
commit8e53e706e56dced8a686c522317642e9cc1e7a0e (patch)
treedb2c6892e3ca5a3ef30dd1e7641ec9969fc9bfb6 /queries/jsx
parentdowncase! directive to use with ruby injections (diff)
downloadnvim-treesitter-8e53e706e56dced8a686c522317642e9cc1e7a0e.tar
nvim-treesitter-8e53e706e56dced8a686c522317642e9cc1e7a0e.tar.gz
nvim-treesitter-8e53e706e56dced8a686c522317642e9cc1e7a0e.tar.bz2
nvim-treesitter-8e53e706e56dced8a686c522317642e9cc1e7a0e.tar.lz
nvim-treesitter-8e53e706e56dced8a686c522317642e9cc1e7a0e.tar.xz
nvim-treesitter-8e53e706e56dced8a686c522317642e9cc1e7a0e.tar.zst
nvim-treesitter-8e53e706e56dced8a686c522317642e9cc1e7a0e.zip
JSX components with capital first letter highlighted as constructor rather than type
Diffstat (limited to 'queries/jsx')
-rw-r--r--queries/jsx/highlights.scm18
1 files changed, 9 insertions, 9 deletions
diff --git a/queries/jsx/highlights.scm b/queries/jsx/highlights.scm
index e8aaffdda..13f654851 100644
--- a/queries/jsx/highlights.scm
+++ b/queries/jsx/highlights.scm
@@ -14,23 +14,23 @@
(jsx_self_closing_element
name: (identifier) @tag)
-(jsx_opening_element ((identifier) @type
- (#match? @type "^[A-Z]")))
+(jsx_opening_element ((identifier) @constructor
+ (#match? @constructor "^[A-Z]")))
; Handle the dot operator effectively - <My.Component>
-(jsx_opening_element ((nested_identifier (identifier) @tag (identifier) @type)))
+(jsx_opening_element ((nested_identifier (identifier) @tag (identifier) @constructor)))
-(jsx_closing_element ((identifier) @type
- (#match? @type "^[A-Z]")))
+(jsx_closing_element ((identifier) @constructor
+ (#match? @constructor "^[A-Z]")))
; Handle the dot operator effectively - </My.Component>
-(jsx_closing_element ((nested_identifier (identifier) @tag (identifier) @type)))
+(jsx_closing_element ((nested_identifier (identifier) @tag (identifier) @constructor)))
-(jsx_self_closing_element ((identifier) @type
- (#match? @type "^[A-Z]")))
+(jsx_self_closing_element ((identifier) @constructor
+ (#match? @constructor "^[A-Z]")))
; Handle the dot operator effectively - <My.Component />
-(jsx_self_closing_element ((nested_identifier (identifier) @tag (identifier) @type)))
+(jsx_self_closing_element ((nested_identifier (identifier) @tag (identifier) @constructor)))
(variable_declarator ((identifier) @type
(#match? @type "^[A-Z]")))