Skip to content

Commit

Permalink
feat: adding astro files support via JSX language syntax (#337)
Browse files Browse the repository at this point in the history
* feat: adding astro files support via JSX language syntax

* Update manifest.json

* Update plugins/language_jsx.lua

Co-authored-by: Guldoman <[email protected]>

* Update plugins/language_jsx.lua

Co-authored-by: Guldoman <[email protected]>

* Apply suggestions from code review

Co-authored-by: Guldoman <[email protected]>

* Update language_jsx.lua

---------

Co-authored-by: Guldoman <[email protected]>
  • Loading branch information
felixsanz and Guldoman authored Nov 11, 2023
1 parent 0297af2 commit 51246d8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
{
"id": "meta_languages",
"type": "meta",
"version": "0.1.2",
"version": "0.1.3",
"mod_version": "3",
"description": "A metapackage containing all publically accessible language syntaxes.",
"dependencies": {
Expand Down Expand Up @@ -867,7 +867,7 @@
},
{
"description": "Syntax for the [JSX](https://reactjs.org/docs/introducing-jsx.html) language for the React framework in JavaScript",
"version": "0.1",
"version": "0.2",
"path": "plugins/language_jsx.lua",
"id": "language_jsx",
"mod_version": "3",
Expand Down
5 changes: 3 additions & 2 deletions plugins/language_jsx.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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" },
Expand Down

0 comments on commit 51246d8

Please sign in to comment.