Vendored from upstream, pinned by commit (see debian/extra/README.source): - gitstatus, gitopen, fontconfig, open_ext, select_colorscheme, smoothcaret, nerdicons (font mapping patched to DATADIR, Ships the Symbols Nerd Font Mono TTF, SIL OFL 1.1) - lite-xl-lsp (complete LSP client; idle until a language server is configured) plus the lite-xl-widgets library it requires - 104 language syntax plugins (none duplicate the nine bundled in core) settings GUI left out upstream is broken: it requires a libraries.widget.fonts widget that does not exist in lite-xl-widgets at any revision. Co-developed-with: ZCode (Z.ai)
105 lines
3.1 KiB
Lua
105 lines
3.1 KiB
Lua
-- mod-version:3
|
|
local syntax = require "core.syntax"
|
|
|
|
syntax.add {
|
|
files = { PATHSEP .. "Caddyfile$" },
|
|
comment = "#",
|
|
patterns = {
|
|
{ pattern = "#.*", type = "comment" },
|
|
{ pattern = { '"', '"', '\\' }, type = "string" },
|
|
-- Matcher definition
|
|
{ pattern = "@[%w_]+", type = "operator" },
|
|
-- Snippet
|
|
{ pattern = "%(%g+%)", type = "operator" },
|
|
-- Properties
|
|
{ pattern = "^[%a_][%w_]*()%s+%f[%g]",
|
|
type = { "function", "normal" }
|
|
},
|
|
{ pattern = "^[%a_][%w_]*()%s+$",
|
|
type = { "function", "normal" }
|
|
},
|
|
{ pattern = "^%s*()[%a_][%w_]*()%s+$",
|
|
type = { "normal", "function", "normal" }
|
|
},
|
|
{ pattern = "^%s*()[%a_][%w_]*()%s+%f[%g]",
|
|
type = { "normal", "function", "normal" }
|
|
},
|
|
-- Environment variables
|
|
{ pattern = "{()%$[%w_]+():()[%w_]+()}",
|
|
type = { "operator", "keyword2", "operator", "keyword2", "operator" }
|
|
},
|
|
{ pattern = "{()%$[%w_]+()}",
|
|
type = { "operator", "keyword2", "operator" }
|
|
},
|
|
-- Place holder
|
|
{ pattern = "{%g-}", type = "keyword2" },
|
|
-- Operators
|
|
{ pattern = "[+%-,:]", type = "operator" },
|
|
-- IP Address
|
|
{ pattern = "%d+%.%d+%.%d+%.%d+", type = "literal" },
|
|
-- Path /path/subpath
|
|
{ pattern = "/[%w%./]+", type = "literal" },
|
|
-- Wildcard domain *.levels
|
|
{ pattern = "%*()[%w.]+",
|
|
type = { "operator", "literal" }
|
|
},
|
|
-- Match Operator
|
|
{ pattern = "%*+", type = "operator" },
|
|
-- Domain leve1.level2
|
|
{ pattern = "https?://[%w%./%*]+", type = "literal" },
|
|
-- Domain leve1.level2
|
|
{ pattern = "%w+%.[%w%.]+", type = "literal" },
|
|
-- Number
|
|
{ pattern = "%d+[mhskbi]*", type = "number" },
|
|
-- Everything else for symbols to work
|
|
{ pattern = "[%a_][%w_]*", type = "symbol" },
|
|
},
|
|
symbols = {
|
|
["true"] = "literal",
|
|
["false"] = "literal",
|
|
["localhost"] = "literal",
|
|
|
|
-- built-in directives
|
|
["abort"] = "keyword",
|
|
["acme_server"] = "keyword",
|
|
["basicauth"] = "keyword",
|
|
["bind"] = "keyword",
|
|
["encode"] = "keyword",
|
|
["error"] = "keyword",
|
|
["file_server"] = "keyword",
|
|
["forward_auth"] = "keyword",
|
|
["handle"] = "keyword",
|
|
["handle_errors"] = "keyword",
|
|
["handle_path"] = "keyword",
|
|
["header"] = "keyword",
|
|
["import"] = "keyword",
|
|
["log"] = "keyword",
|
|
["method"] = "keyword",
|
|
["map"] = "keyword",
|
|
["metrics"] = "keyword",
|
|
["php_fastcgi"] = "keyword",
|
|
["push"] = "keyword",
|
|
["redir"] = "keyword",
|
|
["request_body"] = "keyword",
|
|
["request_header"] = "keyword",
|
|
["respond"] = "keyword",
|
|
["reverse_proxy"] = "keyword",
|
|
["rewrite"] = "keyword",
|
|
["root"] = "keyword",
|
|
["route"] = "keyword",
|
|
["templates"] = "keyword",
|
|
["tls"] = "keyword",
|
|
["tracing"] = "keyword",
|
|
["try_files"] = "keyword",
|
|
["uri"] = "keyword",
|
|
["vars"] = "keyword",
|
|
|
|
-- Module directives
|
|
["cgi"] = "keyword",
|
|
["ssh"] = "keyword",
|
|
["exec"] = "keyword",
|
|
["supervisor"] = "keyword",
|
|
["layer4"] = "keyword",
|
|
},
|
|
}
|