aboutsummaryrefslogtreecommitdiff
path: root/data/plugins/language_css.lua
diff options
context:
space:
mode:
Diffstat (limited to 'data/plugins/language_css.lua')
-rw-r--r--data/plugins/language_css.lua23
1 files changed, 23 insertions, 0 deletions
diff --git a/data/plugins/language_css.lua b/data/plugins/language_css.lua
new file mode 100644
index 00000000..021c5d33
--- /dev/null
+++ b/data/plugins/language_css.lua
@@ -0,0 +1,23 @@
+local syntax = require "core.syntax"
+
+syntax.add {
+ files = { "%.css$" },
+ patterns = {
+ { pattern = "\\.", type = "normal" },
+ { pattern = "//.-\n", type = "comment" },
+ { pattern = { "/%*", "%*/" }, type = "comment" },
+ { pattern = { '"', '"', '\\' }, type = "string" },
+ { pattern = { "'", "'", '\\' }, type = "string" },
+ { pattern = "[%a][%w-]*%s*%f[:]", type = "keyword" },
+ { pattern = "#%x+", type = "string" },
+ { pattern = "-?%d+[%d%.]*p[xt]", type = "number" },
+ { pattern = "-?%d+[%d%.]*deg", type = "number" },
+ { pattern = "-?%d+[%d%.]*", type = "number" },
+ { pattern = "[%a_][%w_]*", type = "symbol" },
+ { pattern = "#[%a][%w_-]*", type = "keyword2" },
+ { pattern = "@[%a][%w_-]*", type = "keyword2" },
+ { pattern = "%.[%a][%w_-]*", type = "keyword2" },
+ { pattern = "[{}:]", type = "operator" },
+ },
+ symbols = {},
+}