-
Notifications
You must be signed in to change notification settings - Fork 2
/
cukmekerb_language_css.lua
27 lines (26 loc) · 1.14 KB
/
cukmekerb_language_css.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
-- mod-version:3
local syntax = require "core.syntax"
syntax.add {
name = "CSS",
files = { "%.css$", "%.rasi$", "%.less$", "%.scss$", "%.sass$"},
block_comment = { "/*", "*/" },
patterns = {
{ pattern = "\\.", type = "selector" },
{ pattern = "//.-\n", type = "comment" },
{ pattern = { "/%*", "%*/" }, type = "comment" },
{ pattern = { '"', '"', '\\' }, type = "string" },
{ pattern = { "'", "'", '\\' }, type = "string" },
{ pattern = "[%a][%w-]*%s*%f[:]", type = "literal" },
{ pattern = "[(]*[%-][%-][%g]+[)]*%s*",type = "literal"},
{ 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 = "string" },
{ pattern = "#[%a][%w_-]*", type = "selector" },
{ pattern = "@[%a][%w_-]*", type = "selector" },
{ pattern = "%.[%a][%w_-]*", type = "selector" },
{ pattern = "[{}:]", type = "operator" },
},
symbols = {},
}