Skip to content
This repository has been archived by the owner on Jul 5, 2022. It is now read-only.

Commit

Permalink
javascriptreact filetype uses javascript queries
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanbyars committed Jun 3, 2022
1 parent e4928b8 commit 8c53d40
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 30 deletions.
16 changes: 15 additions & 1 deletion queries/javascript/nvimGPS.scm
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
; inherits: javascriptreact
; Hooks
;
; calling a hook -> useFoo()
((call_expression
function: (identifier) @hook-name (#match? @hook-name "^use")
) @scope-root)

; JSX
;
; tags -> `<Kachow></Kachow>`
((jsx_element open_tag: (jsx_opening_element name: (_) @tag-name)) @scope-root)

; self-closing tag -> `<Foo />`
((jsx_self_closing_element name: (_) @tag-name) @scope-root)


; Class
((class_declaration
Expand Down
17 changes: 0 additions & 17 deletions queries/javascriptreact/nvimGPS.scm

This file was deleted.

12 changes: 0 additions & 12 deletions queries/reacthooks/nvimGPS.scm

This file was deleted.

0 comments on commit 8c53d40

Please sign in to comment.