Skip to content

Commit

Permalink
Add JSX highlighting queries
Browse files Browse the repository at this point in the history
  • Loading branch information
archseer committed Apr 1, 2022
1 parent d0ff2ff commit a24fb17
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
6 changes: 3 additions & 3 deletions languages.toml
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ file-types = ["js", "jsx", "mjs"]
shebangs = ["node"]
roots = []
comment-token = "//"
# TODO: highlights-jsx, highlights-params
# TODO: highlights-params
language-server = { command = "typescript-language-server", args = ["--stdio"], language-id = "javascript" }
indent = { tab-width = 2, unit = " " }

Expand All @@ -297,7 +297,7 @@ injection-regex = "^(ts|typescript)$"
file-types = ["ts"]
shebangs = []
roots = []
# TODO: highlights-jsx, highlights-params
# TODO: highlights-params
language-server = { command = "typescript-language-server", args = ["--stdio"], language-id = "typescript"}
indent = { tab-width = 2, unit = " " }

Expand All @@ -311,7 +311,7 @@ scope = "source.tsx"
injection-regex = "^(tsx)$" # |typescript
file-types = ["tsx"]
roots = []
# TODO: highlights-jsx, highlights-params
# TODO: highlights-params
language-server = { command = "typescript-language-server", args = ["--stdio"], language-id = "typescriptreact" }
indent = { tab-width = 2, unit = " " }

Expand Down
4 changes: 0 additions & 4 deletions runtime/queries/javascript/highlights-jsx.scm

This file was deleted.

8 changes: 8 additions & 0 deletions runtime/queries/javascript/highlights.scm
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
; JSX
;----

(jsx_opening_element (identifier) @tag)
(jsx_closing_element (identifier) @tag)
(jsx_self_closing_element (identifier) @tag)
(jsx_attribute (property_identifier) @variable.other.member)

; Special identifiers
;--------------------

Expand Down

0 comments on commit a24fb17

Please sign in to comment.