Skip to content

Commit a24fb17

Browse files
committed
Add JSX highlighting queries
1 parent d0ff2ff commit a24fb17

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

languages.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ file-types = ["js", "jsx", "mjs"]
270270
shebangs = ["node"]
271271
roots = []
272272
comment-token = "//"
273-
# TODO: highlights-jsx, highlights-params
273+
# TODO: highlights-params
274274
language-server = { command = "typescript-language-server", args = ["--stdio"], language-id = "javascript" }
275275
indent = { tab-width = 2, unit = " " }
276276

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

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

runtime/queries/javascript/highlights-jsx.scm

Lines changed: 0 additions & 4 deletions
This file was deleted.

runtime/queries/javascript/highlights.scm

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
; JSX
2+
;----
3+
4+
(jsx_opening_element (identifier) @tag)
5+
(jsx_closing_element (identifier) @tag)
6+
(jsx_self_closing_element (identifier) @tag)
7+
(jsx_attribute (property_identifier) @variable.other.member)
8+
19
; Special identifiers
210
;--------------------
311

0 commit comments

Comments
 (0)