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.
22 lines
946 B
22 lines
946 B
3 years ago
|
local syntax = require "core.syntax"
|
||
|
|
||
|
syntax.add {
|
||
|
files = { "%.md$", "%.markdown$" },
|
||
|
patterns = {
|
||
|
{ pattern = "\\.", type = "normal" },
|
||
|
{ pattern = { "<!%-%-", "%-%->" }, type = "comment" },
|
||
|
{ pattern = { "```", "```" }, type = "string" },
|
||
|
{ pattern = { "``", "``", "\\" }, type = "string" },
|
||
|
{ pattern = { "`", "`", "\\" }, type = "string" },
|
||
|
{ pattern = { "~~", "~~", "\\" }, type = "keyword2" },
|
||
|
{ pattern = "%-%-%-+", type = "comment" },
|
||
|
{ pattern = "%*%s+", type = "operator" },
|
||
|
{ pattern = { "%*", "[%*\n]", "\\" }, type = "operator" },
|
||
|
{ pattern = { "%_", "[%_\n]", "\\" }, type = "keyword2" },
|
||
|
{ pattern = "#.-\n", type = "keyword" },
|
||
|
{ pattern = "!?%[.-%]%(.-%)", type = "function" },
|
||
|
{ pattern = "https?://%S+", type = "function" },
|
||
|
},
|
||
|
symbols = { },
|
||
|
}
|