From 9c2d95740d729c45888bd5b911265b928352774f Mon Sep 17 00:00:00 2001 From: kodumbeats Date: Wed, 31 May 2023 16:25:28 -0400 Subject: [PATCH] Support lua as another embedded template language See https://github.com/leafo/etlua --- README.md | 1 + package.json | 8 ++++++++ queries/injections-etlua.scm | 7 +++++++ 3 files changed, 16 insertions(+) create mode 100644 queries/injections-etlua.scm diff --git a/README.md b/README.md index 6eb697c..de394c6 100644 --- a/README.md +++ b/README.md @@ -12,3 +12,4 @@ References * [ERB Documentation](https://ruby-doc.org/stdlib-2.5.1/libdoc/erb/rdoc/ERB.html) * [EJS Documentation](http://ejs.co/#docs) +* [ETLua Documentation](https://github.com/leafo/etlua) diff --git a/package.json b/package.json index c66b32c..f725545 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,14 @@ ], "injections": "queries/injections-erb.scm", "injection-regex": "erb" + }, + { + "scope": "text.html.etlua", + "file-types": [ + "etlua" + ], + "injections": "queries/injections-etlua.scm", + "injection-regex": "etlua" } ] } \ No newline at end of file diff --git a/queries/injections-etlua.scm b/queries/injections-etlua.scm new file mode 100644 index 0000000..dce6eca --- /dev/null +++ b/queries/injections-etlua.scm @@ -0,0 +1,7 @@ +((content) @injection.content + (#set! injection.language "html") + (#set! injection.combined)) + +((code) @injection.content + (#set! injection.language "lua") + (#set! injection.combined))