on master help sign in
Add JSX highlighting queries
a24fb17Blaž Hrastnik
languages.toml+3−3
@@ -270,7 +270,7 @@ file-types = ["js", "jsx", "mjs"]
270shebangs = ["node"]
270shebangs = ["node"]
271roots = []
271roots = []
272comment-token = "//"
272comment-token = "//"
273−# TODO: highlights-jsx, highlights-params
273+# TODO: highlights-params
274language-server = { command = "typescript-language-server", args = ["--stdio"], language-id = "javascript" }
274language-server = { command = "typescript-language-server", args = ["--stdio"], language-id = "javascript" }
275indent = { tab-width = 2, unit = " " }
275indent = { tab-width = 2, unit = " " }
276
276
@@ -297,7 +297,7 @@ injection-regex = "^(ts|typescript)$"
297file-types = ["ts"]
297file-types = ["ts"]
298shebangs = []
298shebangs = []
299roots = []
299roots = []
300−# TODO: highlights-jsx, highlights-params
300+# TODO: highlights-params
301language-server = { command = "typescript-language-server", args = ["--stdio"], language-id = "typescript"}
301language-server = { command = "typescript-language-server", args = ["--stdio"], language-id = "typescript"}
302indent = { tab-width = 2, unit = " " }
302indent = { tab-width = 2, unit = " " }
303
303
@@ -311,7 +311,7 @@ scope = "source.tsx"
311injection-regex = "^(tsx)$" # |typescript
311injection-regex = "^(tsx)$" # |typescript
312file-types = ["tsx"]
312file-types = ["tsx"]
313roots = []
313roots = []
314−# TODO: highlights-jsx, highlights-params
314+# TODO: highlights-params
315language-server = { command = "typescript-language-server", args = ["--stdio"], language-id = "typescriptreact" }
315language-server = { command = "typescript-language-server", args = ["--stdio"], language-id = "typescriptreact" }
316indent = { tab-width = 2, unit = " " }
316indent = { tab-width = 2, unit = " " }
317
317
runtime/queries/javascript/highlights-jsx.scmdeleted−4
@@ -1,4 +0,0 @@
1−(jsx_opening_element (identifier) @tag)
2−(jsx_closing_element (identifier) @tag)
3−(jsx_self_closing_element (identifier) @tag)
4−(jsx_attribute (property_identifier) @attribute)
runtime/queries/javascript/highlights.scm+8
@@ -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+
1; Special identifiers
9; Special identifiers
2;--------------------
10;--------------------
3
11