Skip to content

Commit

Permalink
fix(queries): disable ecma query for now
Browse files Browse the repository at this point in the history
Introduced in the previous commit, this query works with js, jsx, and
tsx, but not ts (i.e. a treesitter query error is thrown when opening a
regular `.ts` typescript file). We will have to figure out a workaround
to get it working with ts as well, but for now we will just disable it.

Issue: #361
  • Loading branch information
tmillr committed Aug 7, 2024
1 parent 46c8c80 commit d2b8230
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions queries/ecma/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
; 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)))
;(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)))

0 comments on commit d2b8230

Please sign in to comment.