diff options
author | FĂ©lix Sanz <felixsanz@users.noreply.github.com> | 2023-11-11 21:53:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-11 21:53:45 +0100 |
commit | 0c0aa76327f1e2bc3eea388a764aba152e5a0bfb (patch) | |
tree | d5d685a1f9de2afc78e5cbb1dfae87b62cb530fb | |
parent | 51246d82f74162c4779de01409121d6e396836a5 (diff) | |
download | lite-xl-plugins-0c0aa76327f1e2bc3eea388a764aba152e5a0bfb.tar.gz lite-xl-plugins-0c0aa76327f1e2bc3eea388a764aba152e5a0bfb.zip |
Added astro extension to TSX and fixed block comments (#338)
* Added astro extension to TSX and fixed block comments
* Update manifest.json
-rw-r--r-- | manifest.json | 2 | ||||
-rw-r--r-- | plugins/language_tsx.lua | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/manifest.json b/manifest.json index a228f5c..842533a 100644 --- a/manifest.json +++ b/manifest.json @@ -1213,7 +1213,7 @@ }, { "description": "Syntax for [TSX](https://www.typescriptlang.org/docs/handbook/jsx.html) language", - "version": "0.1", + "version": "0.2", "path": "plugins/language_tsx.lua", "id": "language_tsx", "mod_version": "3", diff --git a/plugins/language_tsx.lua b/plugins/language_tsx.lua index beedbc6..f6073ab 100644 --- a/plugins/language_tsx.lua +++ b/plugins/language_tsx.lua @@ -5,10 +5,11 @@ local syntax = require "core.syntax" syntax.add { name = "TypeScript with JSX", - files = { "%.tsx$" }, + files = { "%.tsx$", "%.astro$" }, comment = "//", + block_comment = { "/*", "*/" }, patterns = { - { pattern = "//.-\n", type = "comment" }, + { pattern = "//.*", type = "comment" }, { pattern = { "/%*", "%*/" }, type = "comment" }, { pattern = { '"', '"', '\\' }, type = "string" }, { pattern = { "'", "'", '\\' }, type = "string" }, |