aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorFĂ©lix Sanz <felixsanz@users.noreply.github.com>2023-11-11 19:40:32 +0100
committerGitHub <noreply@github.com>2023-11-11 19:40:32 +0100
commit51246d82f74162c4779de01409121d6e396836a5 (patch)
treec7c2ba5873b5923c293d5ce47588c60019e23e0f /plugins
parent0297af2d343fb46de4c48a7968a64daf4731c91b (diff)
downloadlite-xl-plugins-51246d82f74162c4779de01409121d6e396836a5.tar.gz
lite-xl-plugins-51246d82f74162c4779de01409121d6e396836a5.zip
feat: adding astro files support via JSX language syntax (#337)
* feat: adding astro files support via JSX language syntax * Update manifest.json * Update plugins/language_jsx.lua Co-authored-by: Guldoman <giulio.lettieri@gmail.com> * Update plugins/language_jsx.lua Co-authored-by: Guldoman <giulio.lettieri@gmail.com> * Apply suggestions from code review Co-authored-by: Guldoman <giulio.lettieri@gmail.com> * Update language_jsx.lua --------- Co-authored-by: Guldoman <giulio.lettieri@gmail.com>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/language_jsx.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/language_jsx.lua b/plugins/language_jsx.lua
index 04e846b..941e786 100644
--- a/plugins/language_jsx.lua
+++ b/plugins/language_jsx.lua
@@ -4,10 +4,11 @@ local syntax = require "core.syntax"
syntax.add {
name = "JSX",
- files = { "%.jsx$" },
+ files = { "%.jsx$", "%.astro$" },
comment = "//",
+ block_comment = { "/*", "*/" },
patterns = {
- { pattern = "//.-\n", type = "comment" },
+ { pattern = "//.*", type = "comment" },
{ pattern = { "/%*", "%*/" }, type = "comment" },
{ pattern = { '"', '"', '\\' }, type = "string" },
{ pattern = { "'", "'", '\\' }, type = "string" },