lite-xl/data/plugins/language_xml.lua

23 lines
931 B
Lua
Raw Normal View History

2021-04-06 17:50:46 +02:00
-- lite-xl 1.16
2019-12-28 12:16:32 +01:00
local syntax = require "core.syntax"
syntax.add {
files = { "%.xml$", "%.html?$" },
headers = "<%?xml",
2019-12-28 12:16:32 +01:00
patterns = {
{ pattern = { "<!%-%-", "%-%->" }, type = "comment" },
{ pattern = { '%f[^>][^<]', '%f[<]' }, type = "normal" },
{ pattern = { '"', '"', '\\' }, type = "string" },
{ pattern = { "'", "'", '\\' }, type = "string" },
{ pattern = "0x[%da-fA-F]+", type = "number" },
{ pattern = "-?%d+[%d%.]*f?", type = "number" },
{ pattern = "-?%.?%d+f?", type = "number" },
{ pattern = "%f[^<]![%a_][%w_]*", type = "keyword2" },
{ pattern = "%f[^<][%a_][%w_]*", type = "function" },
{ pattern = "%f[^<]/[%a_][%w_]*", type = "function" },
{ pattern = "[%a_][%w_]*", type = "keyword" },
{ pattern = "[/<>=]", type = "operator" },
},
symbols = {},
}