-
-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(queries): mv jsx queries
queries/ecma
-> queries/jsx
Fixes: #361
- Loading branch information
Showing
2 changed files
with
22 additions
and
22 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
;; extends | ||
|
||
; These fix an nvim-treesitter bug where the `Abc` in `Abc.Xyz` is captured as a | ||
; builtin tag. They also change the capture for `Xyz` to `@variable.member` | ||
; instead of e.g. `@tag` (which gives the property a different color). | ||
(jsx_opening_element | ||
name: (member_expression | ||
; If the tag name contains a dot (operator), it must always be a custom | ||
; tag? Therefore, we're not even going to try matching a `@tag.builtin` | ||
; here. | ||
object: (identifier) @tag (#set! "priority" 115) | ||
property: (property_identifier) @variable.member (#set! "priority" 115))) | ||
|
||
(jsx_closing_element | ||
name: (member_expression | ||
object: (identifier) @tag (#set! "priority" 115) | ||
property: (property_identifier) @variable.member (#set! "priority" 115))) | ||
|
||
(jsx_self_closing_element | ||
name: (member_expression | ||
object: (identifier) @tag (#set! "priority" 115) | ||
property: (property_identifier) @variable.member (#set! "priority" 115))) |