diff options
author | lqdev <liquidekgaming@gmail.com> | 2021-07-20 20:26:52 +0200 |
---|---|---|
committer | lqdev <liquidekgaming@gmail.com> | 2021-07-20 20:26:52 +0200 |
commit | 139d90dbc1640d26981e17983f439e9f11a06617 (patch) | |
tree | bd36e5cd34b67cf4e2e787cfd1316408d0d3109f /plugins | |
parent | db213743f769df28e370cbd49a73e147756612c8 (diff) | |
download | lite-xl-plugins-139d90dbc1640d26981e17983f439e9f11a06617.tar.gz lite-xl-plugins-139d90dbc1640d26981e17983f439e9f11a06617.zip |
language_toml added
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/language_toml.lua | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/plugins/language_toml.lua b/plugins/language_toml.lua new file mode 100644 index 0000000..9de31f9 --- /dev/null +++ b/plugins/language_toml.lua @@ -0,0 +1,32 @@ +-- lite-xl 1.16 + +local syntax = require "core.syntax" + +syntax.add { + files = { "%.toml$" }, + comment = '#', + patterns = { + { pattern = "#.-\n", type = "comment" }, + { pattern = { '"""', '"""', '\\' }, type = "string" }, + { pattern = { '"', '"', '\\' }, type = "string" }, + { pattern = { "'''", "'''" }, type = "string" }, + { pattern = { "'", "'" }, type = "string" }, + { pattern = "[A-Za-z0-9_%.%-]+%s*%f[=]", type = "function" }, + { pattern = "%[[A-Za-z0-9_%.%- ]+%]", type = "keyword" }, + { pattern = "%[%[[A-Za-z0-9_%.%- ]+%]%]", type = "keyword" }, + { pattern = "[%-+]?[0-9_]+%.[0-9_]+[eE][%-+]?[0-9_]+", type = "number" }, + { pattern = "[%-+]?[0-9_]+%.[0-9_]+", type = "number" }, + { pattern = "[%-+]?[0-9_]+[eE][%-+]?[0-9_]+", type = "number" }, + { pattern = "[%-+]?[0-9_]+", type = "number" }, + { pattern = "[%-+]?0x[0-9a-fA-F_]+", type = "number" }, + { pattern = "[%-+]?0o[0-7_]+", type = "number" }, + { pattern = "[%-+]?0b[01_]+", type = "number" }, + { pattern = "[%-+]?nan", type = "number" }, + { pattern = "[%-+]?inf", type = "number" }, + { pattern = "[a-z]+", type = "symbol" }, + }, + symbols = { + ["true"] = "literal", + ["false"] = "literal", + }, +} |