diff options
author | Dheisom Gomes <98592255+dheisom@users.noreply.github.com> | 2022-09-10 21:20:12 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-10 20:20:12 -0400 |
commit | 1f2f55f0577bb170be28ff8ecac81680f211cc1b (patch) | |
tree | 379ef43ede9be5e0fefc5af36f9033b66b844429 | |
parent | 7012c1dc9cfe1766799e784582628ab66ab1d9bc (diff) | |
download | lite-xl-plugins-1f2f55f0577bb170be28ff8ecac81680f211cc1b.tar.gz lite-xl-plugins-1f2f55f0577bb170be28ff8ecac81680f211cc1b.zip |
Add syntax highlighting to JSX tags (#118)
* Add syntax highlighting to JSX tags
* Added "from" keyword
-rw-r--r-- | plugins/language_jsx.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/language_jsx.lua b/plugins/language_jsx.lua index 891f160..1cbc4ac 100644 --- a/plugins/language_jsx.lua +++ b/plugins/language_jsx.lua @@ -15,8 +15,9 @@ syntax.add { { pattern = "0x[%da-fA-F]+", type = "number" }, { pattern = "-?%d+[%d%.eE]*", type = "number" }, { pattern = "-?%.?%d+", type = "number" }, - { pattern = "[%+%-=/%*%^%%<>!~|&]", type = "operator" }, + { pattern = "%f[^<]/?[%a_][%w_]*", type = "function" }, { pattern = "[%a_][%w_]*%f[(]", type = "function" }, + { pattern = "[%+%-=/%*%^%%<>!~|&]", type = "operator" }, { pattern = "[%a_][%w_]*", type = "symbol" }, }, symbols = { @@ -37,6 +38,7 @@ syntax.add { ["extends"] = "keyword", ["finally"] = "keyword", ["for"] = "keyword", + ["from"] = "keyword", ["function"] = "keyword", ["get"] = "keyword", ["if"] = "keyword", |