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)
103 lines
2.8 KiB
Lua
103 lines
2.8 KiB
Lua
-- mod-version:3
|
|
local syntax = require 'core.syntax'
|
|
|
|
syntax.add {
|
|
name = "MiniScript",
|
|
files = { "%.ms$" },
|
|
comment = "//",
|
|
patterns = {
|
|
{ pattern = "//.*", type = "comment" },
|
|
{ pattern = { '"', '"' }, type = "string" },
|
|
{ pattern = "[<>!=]=", type = "operator" },
|
|
{ pattern = "[%+%-%*%/%^@<>:]", type = "operator" },
|
|
{ pattern = "%d%.%d*[eE][-+]?%d+", type = "number" },
|
|
{ pattern = "%d%.%d*", type = "number" },
|
|
{ pattern = "%.?%d*[eE][-+]?%d+", type = "number" },
|
|
{ pattern = "%.?%d+", type = "number" },
|
|
{ pattern = "[%a_][%w_]*", type = "symbol" },
|
|
},
|
|
symbols = {
|
|
["if"] = "keyword",
|
|
["not"] = "keyword",
|
|
["and"] = "keyword",
|
|
["or"] = "keyword",
|
|
["else"] = "keyword",
|
|
["then"] = "keyword",
|
|
["for"] = "keyword",
|
|
["in"] = "keyword",
|
|
["while"] = "keyword",
|
|
["break"] = "keyword",
|
|
["continue"] = "keyword",
|
|
["function"] = "keyword",
|
|
["end"] = "keyword",
|
|
["return"] = "keyword",
|
|
["new"] = "keyword",
|
|
["isa"] = "keyword",
|
|
["self"] = "keyword2",
|
|
|
|
["true"] = "literal",
|
|
["false"] = "literal",
|
|
["null"] = "literal",
|
|
["globals"] = "literal",
|
|
["locals"] = "literal",
|
|
["outer"] = "literal",
|
|
|
|
-- Built-in types's classes
|
|
["number"] = "literal",
|
|
["string"] = "literal",
|
|
["list"] = "literal",
|
|
["map"] = "literal",
|
|
["funcRef"] = "literal",
|
|
|
|
-- Intrinsic functions
|
|
["abs"] = "function",
|
|
["acos"] = "function",
|
|
["asin"] = "function",
|
|
["atan"] = "function",
|
|
["bitAnd"] = "function",
|
|
["bitOr"] = "function",
|
|
["bitXor"] = "function",
|
|
["ceil"] = "function",
|
|
["char"] = "function",
|
|
["code"] = "function",
|
|
["cos"] = "function",
|
|
["floor"] = "function",
|
|
["hash"] = "function",
|
|
["hasIndex"] = "function",
|
|
["indexes"] = "function",
|
|
["indexOf"] = "function",
|
|
["insert"] = "function",
|
|
["join"] = "function",
|
|
["len"] = "function",
|
|
["log"] = "function",
|
|
["lower"] = "function",
|
|
["pi"] = "function",
|
|
["pop"] = "function",
|
|
["print"] = "function",
|
|
["pull"] = "function",
|
|
["push"] = "function",
|
|
["range"] = "function",
|
|
["remove"] = "function",
|
|
["replace"] = "function",
|
|
["rnd"] = "function",
|
|
["round"] = "function",
|
|
["shuffle"] = "function",
|
|
["sign"] = "function",
|
|
["sin"] = "function",
|
|
["slice"] = "function",
|
|
["sort"] = "function",
|
|
["split"] = "function",
|
|
["sqrt"] = "function",
|
|
["str"] = "function",
|
|
["sum"] = "function",
|
|
["tan"] = "function",
|
|
["time"] = "function",
|
|
["upper"] = "function",
|
|
["val"] = "function",
|
|
["values"] = "function",
|
|
["version"] = "function",
|
|
["wait"] = "function",
|
|
["yield"] = "function",
|
|
},
|
|
}
|