diff options
author | Blaž Hrastnik | 2022-04-01 08:14:25 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2022-04-01 08:14:25 +0000 |
commit | a24fb17b2a978d3165bd6304e9edd69bddb6dd82 (patch) | |
tree | 7ae97d027af1372dd6c985d6c5ab80ca934e44ca | |
parent | d0ff2ffd891eb9d674840fdff896e6f26dc60ca5 (diff) |
Add JSX highlighting queries
-rw-r--r-- | languages.toml | 6 | ||||
-rw-r--r-- | runtime/queries/javascript/highlights-jsx.scm | 4 | ||||
-rw-r--r-- | runtime/queries/javascript/highlights.scm | 8 |
3 files changed, 11 insertions, 7 deletions
diff --git a/languages.toml b/languages.toml index 3a61ea44..4bbf1689 100644 --- a/languages.toml +++ b/languages.toml @@ -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 = " " } @@ -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 = " " } @@ -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 = " " } diff --git a/runtime/queries/javascript/highlights-jsx.scm b/runtime/queries/javascript/highlights-jsx.scm deleted file mode 100644 index 751da081..00000000 --- a/runtime/queries/javascript/highlights-jsx.scm +++ /dev/null @@ -1,4 +0,0 @@ -(jsx_opening_element (identifier) @tag) -(jsx_closing_element (identifier) @tag) -(jsx_self_closing_element (identifier) @tag) -(jsx_attribute (property_identifier) @attribute) diff --git a/runtime/queries/javascript/highlights.scm b/runtime/queries/javascript/highlights.scm index 6163b680..96bad862 100644 --- a/runtime/queries/javascript/highlights.scm +++ b/runtime/queries/javascript/highlights.scm @@ -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 ;-------------------- |