diff options
author | Dheisom Gomes <98592255+dheisom@users.noreply.github.com> | 2022-09-10 21:20:12 -0300 |
---|---|---|
committer | jgmdev <jgmdev@gmail.com> | 2022-09-10 20:24:18 -0400 |
commit | 591928a3b8235d3941a00d3cdab7719ded8d4e57 (patch) | |
tree | 3e57198c46fc41fc6a47da327156139a2a1ea223 /plugins/language_jsx.lua | |
parent | 9def8a1b4928a5f22b1052db5533369784c1f140 (diff) | |
download | lite-xl-plugins-591928a3b8235d3941a00d3cdab7719ded8d4e57.tar.gz lite-xl-plugins-591928a3b8235d3941a00d3cdab7719ded8d4e57.zip |
Add syntax highlighting to JSX tags (#118)
* Add syntax highlighting to JSX tags
* Added "from" keyword
Diffstat (limited to 'plugins/language_jsx.lua')
-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 90d9979..04e846b 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", |