mirror of
https://github.com/HiPhish/rainbow-delimiters.nvim.git
synced 2024-09-16 14:24:05 +02:00
feat: query for only react tags in jsx,tsx
This commit is contained in:
parent
dfac7cdeae
commit
e78b01a647
3 changed files with 35 additions and 0 deletions
|
@ -353,11 +353,13 @@ addition there are the following extra queries for certain languages:
|
|||
- `rainbow-delimiters-react` Includes React support, set by default for
|
||||
Javascript files
|
||||
- `rainbow-parens` Only parentheses without React tags
|
||||
- `rainbow-tags-react` Only React tags without parentheses
|
||||
- `query`
|
||||
- `rainbow-blocks` Highlight named nodes and identifiers in addition to
|
||||
parentheses (useful for |:InspectTree|)
|
||||
- `tsx`
|
||||
- `rainbow-parens` Just Typescript highlighting without React tags
|
||||
- `rainbow-tags-react` Only React tags without Typescript highlighting
|
||||
- `typescript`
|
||||
- `rainbow-parens` Just Typescript highlighting without React tags
|
||||
- `verilog`
|
||||
|
|
29
queries/javascript/rainbow-tags-react.scm
Normal file
29
queries/javascript/rainbow-tags-react.scm
Normal file
|
@ -0,0 +1,29 @@
|
|||
(jsx_element
|
||||
open_tag: (jsx_opening_element
|
||||
"<" @delimiter
|
||||
name: (identifier) @delimiter
|
||||
">" @delimiter)
|
||||
close_tag: (jsx_closing_element
|
||||
"</" @delimiter
|
||||
name: (identifier) @delimiter
|
||||
">" @delimiter @sentinel)) @container
|
||||
|
||||
(jsx_element
|
||||
open_tag: (jsx_opening_element
|
||||
"<" @delimiter
|
||||
name: (member_expression) @delimiter
|
||||
">" @delimiter)
|
||||
close_tag: (jsx_closing_element
|
||||
"</" @delimiter
|
||||
name: (member_expression) @delimiter
|
||||
">" @delimiter @sentinel)) @container
|
||||
|
||||
(jsx_self_closing_element
|
||||
"<" @delimiter
|
||||
name: (identifier) @delimiter
|
||||
"/>" @delimiter @sentinel) @container
|
||||
|
||||
(jsx_self_closing_element
|
||||
"<" @delimiter
|
||||
name: (member_expression) @delimiter
|
||||
"/>" @delimiter @sentinel) @container
|
4
queries/tsx/rainbow-tags-react.scm
Normal file
4
queries/tsx/rainbow-tags-react.scm
Normal file
|
@ -0,0 +1,4 @@
|
|||
; inherits: javascript
|
||||
|
||||
;;; This query exists for people who only want to highlight tags without
|
||||
;;; parentheses.
|
Loading…
Reference in a new issue