You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
998 B
24 lines
998 B
3 years ago
|
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 = {},
|
||
|
}
|