jsmdcui 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +76 -0
- package/LICENSE +22 -0
- package/README.md +285 -0
- package/package.json +17 -0
- package/project_structure.txt +35 -0
- package/runmd.mjs +240 -0
- package/runtime/colorschemes/atom-dark.micro +33 -0
- package/runtime/colorschemes/bubblegum.micro +31 -0
- package/runtime/colorschemes/cmc-16.micro +47 -0
- package/runtime/colorschemes/cmc-tc.micro +43 -0
- package/runtime/colorschemes/darcula.micro +34 -0
- package/runtime/colorschemes/default.micro +1 -0
- package/runtime/colorschemes/dracula-tc.micro +49 -0
- package/runtime/colorschemes/dukedark-tc.micro +38 -0
- package/runtime/colorschemes/dukelight-tc.micro +38 -0
- package/runtime/colorschemes/dukeubuntu-tc.micro +38 -0
- package/runtime/colorschemes/geany.micro +29 -0
- package/runtime/colorschemes/gotham.micro +29 -0
- package/runtime/colorschemes/gruvbox-tc.micro +29 -0
- package/runtime/colorschemes/gruvbox.micro +26 -0
- package/runtime/colorschemes/material-tc.micro +36 -0
- package/runtime/colorschemes/monokai-dark.micro +28 -0
- package/runtime/colorschemes/monokai.micro +34 -0
- package/runtime/colorschemes/one-dark.micro +39 -0
- package/runtime/colorschemes/railscast.micro +37 -0
- package/runtime/colorschemes/simple.micro +33 -0
- package/runtime/colorschemes/solarized-tc.micro +31 -0
- package/runtime/colorschemes/solarized.micro +30 -0
- package/runtime/colorschemes/sunny-day.micro +29 -0
- package/runtime/colorschemes/twilight.micro +40 -0
- package/runtime/colorschemes/zenburn.micro +30 -0
- package/runtime/help/actions.md +161 -0
- package/runtime/help/cdp.md +119 -0
- package/runtime/help/colors.md +421 -0
- package/runtime/help/commands.md +161 -0
- package/runtime/help/copypaste.md +149 -0
- package/runtime/help/defaultkeys.md +148 -0
- package/runtime/help/help.md +285 -0
- package/runtime/help/keybindings.md +355 -0
- package/runtime/help/linter.md +90 -0
- package/runtime/help/options.md +709 -0
- package/runtime/help/plugins.md +544 -0
- package/runtime/help/tutorial.md +112 -0
- package/runtime/jsplugins/cdp/cdp-server.js +1161 -0
- package/runtime/jsplugins/cdp/cdp.js +192 -0
- package/runtime/jsplugins/chapter/chapter.js +108 -0
- package/runtime/jsplugins/diff/diff.js +46 -0
- package/runtime/jsplugins/example/example.js +110 -0
- package/runtime/jsplugins/linter/linter.js +281 -0
- package/runtime/plugins/autoclose/autoclose.lua +75 -0
- package/runtime/plugins/ftoptions/ftoptions.lua +17 -0
- package/runtime/plugins/literate/README.md +5 -0
- package/runtime/plugins/literate/literate.lua +55 -0
- package/runtime/plugins/status/help/status.md +21 -0
- package/runtime/plugins/status/status.lua +62 -0
- package/runtime/syntax/LICENSE +22 -0
- package/runtime/syntax/PowerShell.yaml +128 -0
- package/runtime/syntax/README.md +63 -0
- package/runtime/syntax/ada.yaml +43 -0
- package/runtime/syntax/apacheconf.yaml +59 -0
- package/runtime/syntax/arduino.yaml +101 -0
- package/runtime/syntax/asciidoc.yaml +51 -0
- package/runtime/syntax/asm.yaml +123 -0
- package/runtime/syntax/ats.yaml +99 -0
- package/runtime/syntax/awk.yaml +44 -0
- package/runtime/syntax/b.yaml +87 -0
- package/runtime/syntax/bat.yaml +57 -0
- package/runtime/syntax/c.yaml +60 -0
- package/runtime/syntax/caddyfile.yaml +23 -0
- package/runtime/syntax/cake.yaml +7 -0
- package/runtime/syntax/clojure.yaml +38 -0
- package/runtime/syntax/cmake.yaml +42 -0
- package/runtime/syntax/coffeescript.yaml +56 -0
- package/runtime/syntax/colortest.yaml +19 -0
- package/runtime/syntax/conky.yaml +17 -0
- package/runtime/syntax/cpp.yaml +91 -0
- package/runtime/syntax/crontab.yaml +36 -0
- package/runtime/syntax/crystal.yaml +72 -0
- package/runtime/syntax/csharp.yaml +52 -0
- package/runtime/syntax/css.yaml +44 -0
- package/runtime/syntax/csx.yaml +8 -0
- package/runtime/syntax/cuda.yaml +68 -0
- package/runtime/syntax/cython.yaml +52 -0
- package/runtime/syntax/d.yaml +121 -0
- package/runtime/syntax/dart.yaml +46 -0
- package/runtime/syntax/default.yaml +10 -0
- package/runtime/syntax/dockerfile.yaml +36 -0
- package/runtime/syntax/dot.yaml +29 -0
- package/runtime/syntax/elixir.yaml +30 -0
- package/runtime/syntax/elm.yaml +38 -0
- package/runtime/syntax/erb.yaml +42 -0
- package/runtime/syntax/erlang.yaml +45 -0
- package/runtime/syntax/fish.yaml +48 -0
- package/runtime/syntax/forth.yaml +34 -0
- package/runtime/syntax/fortran.yaml +64 -0
- package/runtime/syntax/freebsd-kernel.yaml +14 -0
- package/runtime/syntax/fsharp.yaml +48 -0
- package/runtime/syntax/gdscript.yaml +61 -0
- package/runtime/syntax/gemini.yaml +19 -0
- package/runtime/syntax/gentoo-ebuild.yaml +48 -0
- package/runtime/syntax/gentoo-etc-portage.yaml +23 -0
- package/runtime/syntax/git-commit.yaml +35 -0
- package/runtime/syntax/git-config.yaml +14 -0
- package/runtime/syntax/git-rebase-todo.yaml +19 -0
- package/runtime/syntax/gleam.yaml +69 -0
- package/runtime/syntax/glsl.yaml +26 -0
- package/runtime/syntax/gnuplot.yaml +15 -0
- package/runtime/syntax/go.yaml +62 -0
- package/runtime/syntax/godoc.yaml +17 -0
- package/runtime/syntax/golo.yaml +73 -0
- package/runtime/syntax/gomod.yaml +31 -0
- package/runtime/syntax/graphql.yaml +47 -0
- package/runtime/syntax/groff.yaml +30 -0
- package/runtime/syntax/groovy.yaml +111 -0
- package/runtime/syntax/haml.yaml +16 -0
- package/runtime/syntax/hare.yaml +52 -0
- package/runtime/syntax/haskell.yaml +52 -0
- package/runtime/syntax/hc.yaml +52 -0
- package/runtime/syntax/html.yaml +70 -0
- package/runtime/syntax/html4.yaml +25 -0
- package/runtime/syntax/html5.yaml +25 -0
- package/runtime/syntax/ini.yaml +23 -0
- package/runtime/syntax/inputrc.yaml +14 -0
- package/runtime/syntax/java.yaml +37 -0
- package/runtime/syntax/javascript.yaml +124 -0
- package/runtime/syntax/jinja2.yaml +19 -0
- package/runtime/syntax/json.yaml +39 -0
- package/runtime/syntax/jsonnet.yaml +92 -0
- package/runtime/syntax/julia.yaml +57 -0
- package/runtime/syntax/justfile.yaml +40 -0
- package/runtime/syntax/keymap.yaml +27 -0
- package/runtime/syntax/kickstart.yaml +16 -0
- package/runtime/syntax/kotlin.yaml +66 -0
- package/runtime/syntax/kvlang.yaml +67 -0
- package/runtime/syntax/ledger.yaml +14 -0
- package/runtime/syntax/lfe.yaml +17 -0
- package/runtime/syntax/lilypond.yaml +26 -0
- package/runtime/syntax/lisp.yaml +17 -0
- package/runtime/syntax/log.yaml +92 -0
- package/runtime/syntax/lua.yaml +111 -0
- package/runtime/syntax/mail.yaml +25 -0
- package/runtime/syntax/makefile.yaml +38 -0
- package/runtime/syntax/man.yaml +12 -0
- package/runtime/syntax/markdown.yaml +49 -0
- package/runtime/syntax/mc.yaml +23 -0
- package/runtime/syntax/meson.yaml +51 -0
- package/runtime/syntax/micro.yaml +34 -0
- package/runtime/syntax/mpdconf.yaml +13 -0
- package/runtime/syntax/msbuild.yaml +6 -0
- package/runtime/syntax/nanorc.yaml +16 -0
- package/runtime/syntax/nftables.yaml +30 -0
- package/runtime/syntax/nginx.yaml +22 -0
- package/runtime/syntax/nim.yaml +27 -0
- package/runtime/syntax/nix.yaml +32 -0
- package/runtime/syntax/nu.yaml +114 -0
- package/runtime/syntax/objc.yaml +60 -0
- package/runtime/syntax/ocaml.yaml +43 -0
- package/runtime/syntax/octave.yaml +83 -0
- package/runtime/syntax/odin.yaml +64 -0
- package/runtime/syntax/pascal.yaml +45 -0
- package/runtime/syntax/patch.yaml +14 -0
- package/runtime/syntax/peg.yaml +16 -0
- package/runtime/syntax/perl.yaml +58 -0
- package/runtime/syntax/php.yaml +60 -0
- package/runtime/syntax/pkg-config.yaml +12 -0
- package/runtime/syntax/po.yaml +12 -0
- package/runtime/syntax/pony.yaml +37 -0
- package/runtime/syntax/pov.yaml +21 -0
- package/runtime/syntax/privoxy-action.yaml +14 -0
- package/runtime/syntax/privoxy-config.yaml +10 -0
- package/runtime/syntax/privoxy-filter.yaml +12 -0
- package/runtime/syntax/proto.yaml +40 -0
- package/runtime/syntax/prql.yaml +84 -0
- package/runtime/syntax/puppet.yaml +22 -0
- package/runtime/syntax/python2.yaml +60 -0
- package/runtime/syntax/python3.yaml +80 -0
- package/runtime/syntax/r.yaml +32 -0
- package/runtime/syntax/raku.yaml +42 -0
- package/runtime/syntax/reST.yaml +18 -0
- package/runtime/syntax/renpy.yaml +15 -0
- package/runtime/syntax/rpmspec.yaml +43 -0
- package/runtime/syntax/ruby.yaml +73 -0
- package/runtime/syntax/rust.yaml +78 -0
- package/runtime/syntax/sage.yaml +60 -0
- package/runtime/syntax/scad.yaml +53 -0
- package/runtime/syntax/scala.yaml +33 -0
- package/runtime/syntax/sed.yaml +13 -0
- package/runtime/syntax/sh.yaml +69 -0
- package/runtime/syntax/sls.yaml +15 -0
- package/runtime/syntax/smalltalk.yaml +55 -0
- package/runtime/syntax/solidity.yaml +41 -0
- package/runtime/syntax/sql.yaml +35 -0
- package/runtime/syntax/stata.yaml +67 -0
- package/runtime/syntax/svelte.yaml +27 -0
- package/runtime/syntax/swift.yaml +103 -0
- package/runtime/syntax/systemd.yaml +16 -0
- package/runtime/syntax/tcl.yaml +18 -0
- package/runtime/syntax/terraform.yaml +87 -0
- package/runtime/syntax/tex.yaml +32 -0
- package/runtime/syntax/toml.yaml +56 -0
- package/runtime/syntax/twig.yaml +55 -0
- package/runtime/syntax/typescript.yaml +49 -0
- package/runtime/syntax/v.yaml +80 -0
- package/runtime/syntax/vala.yaml +26 -0
- package/runtime/syntax/verilog.yaml +60 -0
- package/runtime/syntax/vhdl.yaml +37 -0
- package/runtime/syntax/vi.yaml +31 -0
- package/runtime/syntax/vue.yaml +64 -0
- package/runtime/syntax/xml.yaml +37 -0
- package/runtime/syntax/xresources.yaml +14 -0
- package/runtime/syntax/yaml.yaml +34 -0
- package/runtime/syntax/yum.yaml +12 -0
- package/runtime/syntax/zig.yaml +52 -0
- package/runtime/syntax/zscript.yaml +72 -0
- package/runtime/syntax/zsh.yaml +52 -0
- package/single-exe/README.md +80 -0
- package/single-exe/assetsHelper.js +90 -0
- package/single-exe/assetsLoader.mjs +85 -0
- package/single-exe/compiled.js +149 -0
- package/single-exe/entry.mjs +9 -0
- package/single-exe/packAssets.sh +7 -0
- package/src/buffer/backup.js +160 -0
- package/src/buffer/buffer.js +126 -0
- package/src/buffer/fixed3-codec.js +140 -0
- package/src/buffer/loc.js +38 -0
- package/src/buffer/message.js +29 -0
- package/src/config/clean.js +172 -0
- package/src/config/colorscheme.js +99 -0
- package/src/config/config.js +122 -0
- package/src/config/defaults.js +109 -0
- package/src/cui/rpc.mjs +259 -0
- package/src/cui/server.mjs +116 -0
- package/src/display/ansi-style.js +60 -0
- package/src/highlight/highlighter.js +243 -0
- package/src/highlight/parser.js +225 -0
- package/src/index.js +8009 -0
- package/src/lua/engine.js +71 -0
- package/src/platform/archive.js +50 -0
- package/src/platform/clipboard.js +278 -0
- package/src/platform/commands.js +137 -0
- package/src/plugins/js-bridge.js +983 -0
- package/src/plugins/manager.js +674 -0
- package/src/runtime/assets.js +90 -0
- package/src/runtime/compiled.js +25 -0
- package/src/runtime/encodings.js +10 -0
- package/src/runtime/registry.js +134 -0
- package/src/screen/cell-buffer.js +81 -0
- package/src/screen/events.js +263 -0
- package/src/screen/screen.js +142 -0
- package/src/screen/vt100.js +571 -0
- package/src/shell/shell.js +70 -0
- package/testapp.md +55 -0
- package/tests/backup.test.js +133 -0
- package/tests/cmphex3b64.js +95 -0
- package/tests/pty-demo.js +492 -0
- package/tests/wv-client.js +96 -0
- package/tui +5 -0
- package/wui +5 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
filetype: lisp
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "(emacs|zile)$|\\.(el|li?sp|scm|ss|rkt)$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- default: "\\([a-z-]+"
|
|
8
|
+
- symbol: "\\(([\\-+*/<>]|<=|>=)|'"
|
|
9
|
+
- constant.number: "\\b[0-9]+b>"
|
|
10
|
+
- special: "\\bnil\\b"
|
|
11
|
+
- preproc: "\\b[tT]b>"
|
|
12
|
+
- constant.string: "\\\"(\\\\.|[^\"])*\\\""
|
|
13
|
+
- constant.specialChar: "'[A-Za-z][A-Za-z0-9_-]+"
|
|
14
|
+
- constant.specialChar: "\\\\.?"
|
|
15
|
+
- comment: "(^|[[:space:]]);.*"
|
|
16
|
+
- indent-char.whitespace: "[[:space:]]+$"
|
|
17
|
+
- indent-char: " + +| + +"
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
filetype: log
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "(\\.log|log\\.txt)$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- diff-modified: "\\b(WARN(ING)?|[Ww]arn(ing)?|w(r)?n|w|W/)\\b"
|
|
8
|
+
- diff-modified: "\\b(CRITICAL|[Cc]ritical)\\b"
|
|
9
|
+
|
|
10
|
+
- constant: "\\b(INFO(RMATION)?|[Ii]nfo(rmation)?|[Ii]n(f)?|i|I/)\\b"
|
|
11
|
+
- constant: "\\b(DEBUG|[Dd]ebug|dbug|dbg|de|d|D/)\\b"
|
|
12
|
+
- constant: "\\b(VERBOSE|[Vv]erbose|V/)\\b"
|
|
13
|
+
- constant: "\\b(ALERT|[Aa]lert)\\b"
|
|
14
|
+
|
|
15
|
+
- preproc: "\\b(TRACE|Trace|NOTICE|VERBOSE|verb|vrb|vb|v)\\b"
|
|
16
|
+
|
|
17
|
+
- gutter-error: "\\b(ERROR|[Ee]rr(or)?|[Ee]r(or)?|e|E\\x2F)\\b"
|
|
18
|
+
- gutter-error: "\\b(FATAL|[Ff]atal)\\b"
|
|
19
|
+
- gutter-error: "\\b(EMERGENCY|[Ee]mergency)\\b"
|
|
20
|
+
- gutter-error: "\\b(FAIL(URE)?|[Ff]ail(ure)?)\\b"
|
|
21
|
+
|
|
22
|
+
# constants
|
|
23
|
+
- constant.bool.true: "\\b(YES|yes|Y|y|ON|on|TRUE|True|true)\\b"
|
|
24
|
+
- constant.bool.false: "\\b(NO|no|N|n|OFF|off|FALSE|False|false)\\b"
|
|
25
|
+
- constant.bool.false: "\\b(None|null|nil)\\b"
|
|
26
|
+
|
|
27
|
+
# numbers
|
|
28
|
+
- constant.number: "\\b[0-9](_?[0-9])*(\\.([0-9](_?[0-9])*)?)?(e[0-9](_?[0-9])*)?\\b" # decimal
|
|
29
|
+
- constant.number: "\\b0b(_?[01])+\\b" # bin
|
|
30
|
+
- constant.number: "\\b0o(_?[0-7])+\\b" # oct
|
|
31
|
+
- constant.number: "\\b0x(_?[0-9a-f])+\\b" # hex
|
|
32
|
+
|
|
33
|
+
# operators
|
|
34
|
+
- symbol.operator: "([~^.:;,+*|=!\\%]|<|>|/|-|&)"
|
|
35
|
+
|
|
36
|
+
# parentheses
|
|
37
|
+
- symbol.brackets: "([(){}]|\\[|\\])"
|
|
38
|
+
|
|
39
|
+
# string
|
|
40
|
+
- constant.string:
|
|
41
|
+
start: "\""
|
|
42
|
+
end: "(\"|$)"
|
|
43
|
+
skip: "\\\\."
|
|
44
|
+
rules:
|
|
45
|
+
- constant.specialChar: "\\\\."
|
|
46
|
+
|
|
47
|
+
- constant.string:
|
|
48
|
+
start: "'"
|
|
49
|
+
end: "('|$)"
|
|
50
|
+
skip: "\\\\."
|
|
51
|
+
rules:
|
|
52
|
+
- constant.specialChar: "\\\\."
|
|
53
|
+
|
|
54
|
+
# file
|
|
55
|
+
- preproc: "\\b(FILE|File|file)\\b"
|
|
56
|
+
|
|
57
|
+
# time
|
|
58
|
+
- identifier: "\\b((([Mm]on|[Tt]ues|[Ww]ed(nes)?|[Tt]hur(s)?|[Ff]ri|[Ss]at(ur)?|[Ss]un)(day)?\\s)?([Jj]an(uary)?|[Ff]eb(ruary)?|[Mm]ar(ch)?|[Aa]pr(il)?|[Mm]ay|[Jj]un(e)?|[Jj]ul(y)?|[Aa]ug(ust)?|[Aa]go|[Ss]ep(tember)?|[Oo]ct(ober)?|[Nn]ov(ember)?|[Dd]ec(ember)?)\\s\\d{1,2},?(\\s\\d{4})?)\\b" # date
|
|
59
|
+
- identifier: "\\b(\\d{2,4}[-/\\.]?\\d{2,3}[-/\\.]?\\d{2,4})\\b" # date
|
|
60
|
+
- identifier: "\\b(\\d{2}:\\d{2}(:\\d{2})?([\\.,]?\\d{1,8}[\\.\\+,]?\\d{1,8}?)?([\\.\\+,]?\\d{1,8}[\\.\\+,]?\\d{1,8}?)?([\\.\\+,]?\\d{1,8}?)?(\\s-\\d{0,4})?)\\b" # time
|
|
61
|
+
- identifier: "^([0-2][0-9][0-2][0-9][-/]?[0-9][0-9][-/]?[0-9][0-9])"
|
|
62
|
+
# - identifier: "^([0-2][0-9][0-2][0-9][-/]?[0-9][0-9][-/]?[0-9][0-9]\\s[0-9][0-9]:[0-9][0-9](:[0-9][0-9])?(\\.?[0-9][0-9][0-9])?)"
|
|
63
|
+
- identifier: "^(\\d{4}[-/]?\\d{2}[-/]?\\d{2}\\s\\d{2}:\\d{2}(:\\d{2})?(\\.?\\d{2,8})?)"
|
|
64
|
+
- identifier: "^([0-2][0-9]|[0-2]-?[0-9][0-9]-?[0-9][0-9])\\-([0-1][0-9])\\-([0-3][0-9]) ([0-2][0-9])\\:([0-5][0-9])\\:([0-5][0-9]),([0-9][0-9][0-9])"
|
|
65
|
+
# Complete precision:
|
|
66
|
+
- identifier: "^(\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d\\.\\d+([+-][0-2]\\d:[0-5]\\d|Z))"
|
|
67
|
+
# No milliseconds:
|
|
68
|
+
- identifier: "^(\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d([+-][0-2]\\d:[0-5]\\d|Z))"
|
|
69
|
+
# No Seconds:
|
|
70
|
+
- identifier: "^(\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d([+-][0-2]\\d:[0-5]\\d|Z))"
|
|
71
|
+
# Putting it all together:
|
|
72
|
+
- identifier: "^(\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d\\.\\d+([+-][0-2]\\d:[0-5]\\d|Z))|(\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d([+-][0-2]\\d:[0-5]\\d|Z))|(\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d([+-][0-2]\\d:[0-5]\\d|Z))"
|
|
73
|
+
# Complete precision:
|
|
74
|
+
- identifier: "^(\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d\\.\\d+)"
|
|
75
|
+
# No milliseconds
|
|
76
|
+
- identifier: "^(\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d)"
|
|
77
|
+
# No Seconds
|
|
78
|
+
- identifier: "^(\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d)"
|
|
79
|
+
# Putting it all together
|
|
80
|
+
- identifier: "^(\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d\\.\\d+)|(\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d)|(\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d)"
|
|
81
|
+
|
|
82
|
+
# link
|
|
83
|
+
- constant.string.url:
|
|
84
|
+
start: "https?://"
|
|
85
|
+
end: "\\s"
|
|
86
|
+
rules: []
|
|
87
|
+
|
|
88
|
+
# path
|
|
89
|
+
# - constant.string.url: "\\b(.+)/([^/]+)\\b" # linux
|
|
90
|
+
# - constant.string.url: "\\b(^[a-zA-Z]:)\\b" # windowns
|
|
91
|
+
|
|
92
|
+
- diff-modified: "([Cc]ommit:)\\s\\w+\\[\\w+]"
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
filetype: lua
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.lua$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- statement: "\\b(do|end|while|break|repeat|until|if|elseif|then|else|for|in|function|local|return|goto)\\b"
|
|
8
|
+
- statement: "\\b(not|and|or)\\b"
|
|
9
|
+
- statement: "\\b(debug|string|math|table|io|coroutine|os|utf8|bit32)\\b\\."
|
|
10
|
+
- statement: "\\b(_ENV|_G|_VERSION|assert|collectgarbage|dofile|error|getfenv|getmetatable|ipairs|load|loadfile|module|next|pairs|pcall|print|rawequal|rawget|rawlen|rawset|require|select|setfenv|setmetatable|tonumber|tostring|type|unpack|xpcall)\\s*\\("
|
|
11
|
+
- identifier: "io\\.\\b(close|flush|input|lines|open|output|popen|read|tmpfile|type|write)\\b"
|
|
12
|
+
- identifier: "math\\.\\b(abs|acos|asin|atan2|atan|ceil|cosh|cos|deg|exp|floor|fmod|frexp|huge|ldexp|log10|log|max|maxinteger|min|mininteger|modf|pi|pow|rad|random|randomseed|sin|sqrt|tan|tointeger|type|ult)\\b"
|
|
13
|
+
- identifier: "os\\.\\b(clock|date|difftime|execute|exit|getenv|remove|rename|setlocale|time|tmpname)\\b"
|
|
14
|
+
- identifier: "package\\.\\b(config|cpath|loaded|loadlib|path|preload|seeall|searchers|searchpath)\\b"
|
|
15
|
+
- identifier: "string\\.\\b(byte|char|dump|find|format|gmatch|gsub|len|lower|match|pack|packsize|rep|reverse|sub|unpack|upper)\\b"
|
|
16
|
+
- identifier: "table\\.\\b(concat|insert|maxn|move|pack|remove|sort|unpack)\\b"
|
|
17
|
+
- identifier: "utf8\\.\\b(char|charpattern|codes|codepoint|len|offset)\\b"
|
|
18
|
+
- identifier: "coroutine\\.\\b(create|isyieldable|resume|running|status|wrap|yield)\\b"
|
|
19
|
+
- identifier: "debug\\.\\b(debug|getfenv|gethook|getinfo|getlocal|getmetatable|getregistry|getupvalue|getuservalue|setfenv|sethook|setlocal|setmetatable|setupvalue|setuservalue|traceback|upvalueid|upvaluejoin)\\b"
|
|
20
|
+
- identifier: "bit32\\.\\b(arshift|band|bnot|bor|btest|bxor|extract|replace|lrotate|lshift|rrotate|rshift)\\b"
|
|
21
|
+
- identifier: "\\:\\b(close|flush|lines|read|seek|setvbuf|write|byte|char|dump|find|format|gmatch|gsub|len|lower|match|pack|packsize|rep|reverse|sub|unpack|upper)\\b"
|
|
22
|
+
- identifier: "\\b(self|arg)\\b"
|
|
23
|
+
- constant: "\\b(false|nil|true)\\b"
|
|
24
|
+
- statement: "(\\b(dofile|require|include)|%q|%!|%Q|%r|%x)\\b"
|
|
25
|
+
|
|
26
|
+
- symbol.brackets: "[(){}\\[\\]]"
|
|
27
|
+
- symbol: "(\\*|//|/|%|\\+|-|\\^|>|>=|<|<=|~=|=|[\\.]{2,3}|#)"
|
|
28
|
+
|
|
29
|
+
- constant.number: "\\b((0[xX](([0-9A-Fa-f]+\\.[0-9A-Fa-f]*)|(\\.?[0-9A-Fa-f]+))([pP][-+]?[0-9]+)?)|((([0-9]+\\.[0-9]*)|(\\.?[0-9]+))([eE][-+]?[0-9]+)?))"
|
|
30
|
+
|
|
31
|
+
- constant.string:
|
|
32
|
+
start: "\""
|
|
33
|
+
end: "\""
|
|
34
|
+
skip: "\\\\."
|
|
35
|
+
rules:
|
|
36
|
+
- constant.specialChar: "\\\\([abfnrtvz\\'\"]|[0-9]{1,3}|x[0-9a-fA-F][0-9a-fA-F]|u\\{[0-9a-fA-F]+\\})"
|
|
37
|
+
|
|
38
|
+
- constant.string:
|
|
39
|
+
start: "'"
|
|
40
|
+
end: "'"
|
|
41
|
+
skip: "\\\\."
|
|
42
|
+
rules:
|
|
43
|
+
- constant.specialChar: "\\\\([abfnrtvz\\'\"]|[0-9]{1,3}|x[0-9a-fA-F][0-9a-fA-F]|u\\{[0-9a-fA-F]+\\})"
|
|
44
|
+
|
|
45
|
+
- constant.string:
|
|
46
|
+
start: "\\[\\["
|
|
47
|
+
end: "\\]\\]"
|
|
48
|
+
rules: []
|
|
49
|
+
|
|
50
|
+
# support first few lengths of "long brackets" explicitly
|
|
51
|
+
# brackets longer than that will give false positives
|
|
52
|
+
|
|
53
|
+
- constant.string:
|
|
54
|
+
start: "\\[=\\["
|
|
55
|
+
end: "\\]=\\]"
|
|
56
|
+
rules: []
|
|
57
|
+
|
|
58
|
+
- constant.string:
|
|
59
|
+
start: "\\[==\\["
|
|
60
|
+
end: "\\]==\\]"
|
|
61
|
+
rules: []
|
|
62
|
+
|
|
63
|
+
- constant.string:
|
|
64
|
+
start: "\\[===\\["
|
|
65
|
+
end: "\\]===\\]"
|
|
66
|
+
rules: []
|
|
67
|
+
|
|
68
|
+
- constant.string:
|
|
69
|
+
start: "\\[====+\\["
|
|
70
|
+
end: "\\]====+\\]"
|
|
71
|
+
rules: []
|
|
72
|
+
|
|
73
|
+
- comment.block:
|
|
74
|
+
start: "\\-\\-\\[\\["
|
|
75
|
+
end: "\\]\\]"
|
|
76
|
+
rules:
|
|
77
|
+
- todo: "(TODO|NOTE|FIXME):?"
|
|
78
|
+
|
|
79
|
+
# support long brackets, same as with multiline strings
|
|
80
|
+
|
|
81
|
+
- comment.block:
|
|
82
|
+
start: "\\-\\-\\[=\\["
|
|
83
|
+
end: "\\]=\\]"
|
|
84
|
+
rules:
|
|
85
|
+
- todo: "(TODO|NOTE|FIXME):?"
|
|
86
|
+
|
|
87
|
+
- comment.block:
|
|
88
|
+
start: "\\-\\-\\[==\\["
|
|
89
|
+
end: "\\]==\\]"
|
|
90
|
+
rules:
|
|
91
|
+
- todo: "(TODO|NOTE|FIXME):?"
|
|
92
|
+
|
|
93
|
+
- comment.block:
|
|
94
|
+
start: "\\-\\-\\[===\\["
|
|
95
|
+
end: "\\]===\\]"
|
|
96
|
+
rules:
|
|
97
|
+
- todo: "(TODO|NOTE|FIXME):?"
|
|
98
|
+
|
|
99
|
+
- comment.block:
|
|
100
|
+
start: "\\-\\-\\[====+\\["
|
|
101
|
+
end: "\\]====+\\]"
|
|
102
|
+
rules:
|
|
103
|
+
- todo: "(TODO|NOTE|FIXME):?"
|
|
104
|
+
|
|
105
|
+
# this has to go after block comment or block comment does not work
|
|
106
|
+
|
|
107
|
+
- comment:
|
|
108
|
+
start: "\\-\\-"
|
|
109
|
+
end: "$"
|
|
110
|
+
rules:
|
|
111
|
+
- todo: "(TODO|NOTE|FIXME):?"
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
filetype: mail
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "(.*/mutt-.*|\\.eml)$"
|
|
5
|
+
header: "^From .* \\d+:\\d+:\\d+ \\d+"
|
|
6
|
+
|
|
7
|
+
rules:
|
|
8
|
+
- type: "^From .*"
|
|
9
|
+
- identifier: "^[^[:space:]]+:"
|
|
10
|
+
- preproc: "^List-(Id|Archive|Subscribe|Unsubscribe|Post|Help):"
|
|
11
|
+
- constant: "^(To|From):"
|
|
12
|
+
- constant.string:
|
|
13
|
+
start: "^Subject:.*"
|
|
14
|
+
end: "$"
|
|
15
|
+
rules:
|
|
16
|
+
- constant.specialChar: "\\\\."
|
|
17
|
+
- statement: "<?[^@[:space:]]+@[^[:space:]]+>?"
|
|
18
|
+
- default:
|
|
19
|
+
start: "^\\n\\n"
|
|
20
|
+
end: ".*"
|
|
21
|
+
rules: []
|
|
22
|
+
- comment:
|
|
23
|
+
start: "^>.*"
|
|
24
|
+
end: "$"
|
|
25
|
+
rules: []
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
filetype: makefile
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "([Mm]akefile|\\.ma?k)$"
|
|
5
|
+
header: "^#!.*/(env +)?[bg]?make( |$)"
|
|
6
|
+
|
|
7
|
+
rules:
|
|
8
|
+
- preproc: "\\<(ifeq|ifdef|ifneq|ifndef|else|endif)\\>"
|
|
9
|
+
- statement: "^(export|include|override)\\>"
|
|
10
|
+
- symbol.operator: "^[^:= ]+:"
|
|
11
|
+
- symbol.operator: "([=,%]|\\+=|\\?=|:=|&&|\\|\\|)"
|
|
12
|
+
- statement: "\\$\\((abspath|addprefix|addsuffix|and|basename|call|dir)[[:space:]]"
|
|
13
|
+
- statement: "\\$\\((error|eval|filter|filter-out|findstring|firstword)[[:space:]]"
|
|
14
|
+
- statement: "\\$\\((flavor|foreach|if|info|join|lastword|notdir|or)[[:space:]]"
|
|
15
|
+
- statement: "\\$\\((origin|patsubst|realpath|shell|sort|strip|suffix)[[:space:]]"
|
|
16
|
+
- statement: "\\$\\((value|warning|wildcard|word|wordlist|words)[[:space:]]"
|
|
17
|
+
- identifier: "^.+:"
|
|
18
|
+
- identifier: "[()$]"
|
|
19
|
+
- constant.string:
|
|
20
|
+
start: "\""
|
|
21
|
+
end: "\""
|
|
22
|
+
skip: "\\\\."
|
|
23
|
+
rules:
|
|
24
|
+
- constant.specialChar: "\\\\."
|
|
25
|
+
- constant.string:
|
|
26
|
+
start: "'"
|
|
27
|
+
end: "'"
|
|
28
|
+
skip: "\\\\."
|
|
29
|
+
rules:
|
|
30
|
+
- constant.specialChar: "\\\\."
|
|
31
|
+
- identifier: "\\$+(\\{[^} ]+\\}|\\([^) ]+\\))"
|
|
32
|
+
- identifier: "\\$[@^<*?%|+]|\\$\\([@^<*?%+-][DF]\\)"
|
|
33
|
+
- identifier: "\\$\\$|\\\\.?"
|
|
34
|
+
- comment:
|
|
35
|
+
start: "#"
|
|
36
|
+
end: "$"
|
|
37
|
+
rules: []
|
|
38
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
filetype: man
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.[1-9]x?$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- green: "\\.(S|T)H.*$"
|
|
8
|
+
- brightgreen: "\\.(S|T)H|\\.TP"
|
|
9
|
+
- brightred: "\\.(BR?|I[PR]?).*$"
|
|
10
|
+
- brightblue: "\\.(BR?|I[PR]?|PP)"
|
|
11
|
+
- brightwhite: "\\\\f[BIPR]"
|
|
12
|
+
- yellow: "\\.(br|DS|RS|RE|PD)"
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
filetype: markdown
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.(livemd|md|mkd|mkdn|markdown)$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
# Tables (Github extension)
|
|
8
|
+
- type: ".*[ :]\\|[ :].*"
|
|
9
|
+
|
|
10
|
+
# quotes
|
|
11
|
+
- statement: "^>.*"
|
|
12
|
+
|
|
13
|
+
# Emphasis
|
|
14
|
+
- type: "(^|[[:space:]])(_[^ ][^_]*_|\\*[^ ][^*]*\\*)"
|
|
15
|
+
|
|
16
|
+
# Strong emphasis
|
|
17
|
+
- type: "(^|[[:space:]])(__[^ ][^_]*__|\\*\\*[^ ][^*]*\\*\\*)"
|
|
18
|
+
|
|
19
|
+
# strike-through
|
|
20
|
+
- type: "(^|[[:space:]])~~[^ ][^~]*~~"
|
|
21
|
+
|
|
22
|
+
# horizontal rules
|
|
23
|
+
- special: "^(---+|===+|___+|\\*\\*\\*+)\\s*$"
|
|
24
|
+
|
|
25
|
+
# headlines
|
|
26
|
+
- special: "^#{1,6}.*"
|
|
27
|
+
|
|
28
|
+
# lists
|
|
29
|
+
- identifier: "^[[:space:]]*[\\*+-] |^[[:space:]]*[0-9]+\\. "
|
|
30
|
+
|
|
31
|
+
# misc
|
|
32
|
+
- preproc: "(\\(([CcRr]|[Tt][Mm])\\)|\\.{3}|(^|[[:space:]])\\-\\-($|[[:space:]]))"
|
|
33
|
+
|
|
34
|
+
# links
|
|
35
|
+
- constant: "\\[[^]]+\\]"
|
|
36
|
+
- constant: "\\[([^][]|\\[[^]]*\\])*\\]\\([^)]+\\)"
|
|
37
|
+
|
|
38
|
+
# images
|
|
39
|
+
- underlined: "!\\[[^][]*\\](\\([^)]+\\)|\\[[^]]+\\])"
|
|
40
|
+
|
|
41
|
+
# urls
|
|
42
|
+
- underlined: "https?://[^ )>]+"
|
|
43
|
+
|
|
44
|
+
- special: "^```$"
|
|
45
|
+
|
|
46
|
+
- special:
|
|
47
|
+
start: "`"
|
|
48
|
+
end: "`"
|
|
49
|
+
rules: []
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# sendmail config files
|
|
2
|
+
|
|
3
|
+
filetype: mc
|
|
4
|
+
|
|
5
|
+
detect:
|
|
6
|
+
filename: "\\.mc$"
|
|
7
|
+
|
|
8
|
+
rules:
|
|
9
|
+
- statement: "^(divert|VERSIONID|OSTYPE|DOMAIN|FEATURE|define)"
|
|
10
|
+
- statement: "^(DAEMON_OPTIONS|MAILER)"
|
|
11
|
+
- comment:
|
|
12
|
+
start: "#"
|
|
13
|
+
end: "$"
|
|
14
|
+
rules: []
|
|
15
|
+
- comment:
|
|
16
|
+
start: "dnl"
|
|
17
|
+
end: "$"
|
|
18
|
+
rules: []
|
|
19
|
+
- constant.string:
|
|
20
|
+
start: "`"
|
|
21
|
+
end: "'"
|
|
22
|
+
rules: []
|
|
23
|
+
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
filetype: meson
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "(meson\\.build|meson_options\\.txt|meson\\.options)"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
|
|
8
|
+
# refer to https://mesonbuild.com/Syntax.html
|
|
9
|
+
|
|
10
|
+
- statement: "\\b(elif|else|if|endif)\\b"
|
|
11
|
+
- statement: "\\b(foreach|endforeach)\\b"
|
|
12
|
+
- statement: "\\b(continue|break)\\b"
|
|
13
|
+
- statement: "\\b(and|not|or|in)\\b"
|
|
14
|
+
|
|
15
|
+
- symbol.operator: "[<>?:+*/-]|[+!<>=]?="
|
|
16
|
+
- symbol.brackets: "[(){}\\[\\]]"
|
|
17
|
+
|
|
18
|
+
- constant.number: "\\b(0|[1-9][0-9]*)\\b" # decimal
|
|
19
|
+
- constant.number: "\\b(0b[01]+)\\b" # bin
|
|
20
|
+
- constant.number: "\\b(0o[0-7]+)\\b" # oct
|
|
21
|
+
- constant.number: "\\b(0x[0-9a-fA-F]+)\\b" # hex
|
|
22
|
+
|
|
23
|
+
# meson builtins
|
|
24
|
+
- identifier: "\\b(add_global_arguments|add_global_link_arguments|add_languages|add_project_arguments|add_project_dependencies)\\b"
|
|
25
|
+
- identifier: "\\b(add_project_link_arguments|add_test_setup|alias_target|assert|benchmark|both_libraries|build_machine|build_target|configuration_data)\\b"
|
|
26
|
+
- identifier: "\\b(configure_file|custom_target|debug|declare_dependency|dependency|disabler|environment|error|executable|files)\\b"
|
|
27
|
+
- identifier: "\\b(find_program|generator|get_option|get_variable|host_machine|import|include_directories|install_data|install_emptydir)\\b"
|
|
28
|
+
- identifier: "\\b(install_headers|install_man|install_subdir|install_symlink|is_disabler|is_variable|jar|join_paths|library|meson)\\b"
|
|
29
|
+
- identifier: "\\b(message|option|project|range|run_command|run_target|set_variable|shared_library|shared_module|static_library)\\b"
|
|
30
|
+
- identifier: "\\b(structured_sources|subdir|subdir_done|subproject|summary|target_machine|test|unset_variable|vcs_tag|warning)\\b"
|
|
31
|
+
|
|
32
|
+
- constant.bool: "\\b(true|false)\\b"
|
|
33
|
+
|
|
34
|
+
- comment:
|
|
35
|
+
start: "#"
|
|
36
|
+
end: "$"
|
|
37
|
+
rules: []
|
|
38
|
+
|
|
39
|
+
# multiline strings do not support escape sequences
|
|
40
|
+
- constant.string:
|
|
41
|
+
start: "'''"
|
|
42
|
+
end: "'''"
|
|
43
|
+
rules: []
|
|
44
|
+
|
|
45
|
+
- constant.string:
|
|
46
|
+
start: "'"
|
|
47
|
+
end: "'"
|
|
48
|
+
skip: "\\\\."
|
|
49
|
+
rules:
|
|
50
|
+
- constant.specialChar: "\\\\[abfnrtv\\\\']"
|
|
51
|
+
- constant.specialChar: "\\\\([0-7]{1,3}|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8}|N\\{[^\\}]+\\})"
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
filetype: micro
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.(micro)$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- statement: "\\b(syntax|color(-link)?)\\b"
|
|
8
|
+
- statement: "\\b(start=|end=)\\b"
|
|
9
|
+
# Simple one-liners
|
|
10
|
+
- identifier: "\\b(default|number|statement|underlined|error|todo|statusline|indent-char|cursor\\-line|color\\-column|ignore|divider|tabbar)\\b"
|
|
11
|
+
# Separate identifiers to keep "complex" regex clean
|
|
12
|
+
- identifier: "\\b(special(Char)?)\\b"
|
|
13
|
+
- identifier: "\\b((current\\-)?line\\-number)\\b"
|
|
14
|
+
- identifier: "\\b(gutter\\-(info|error|warning){1})\\b"
|
|
15
|
+
- identifier: "\\b(comment(\\.bright)?)\\b"
|
|
16
|
+
- identifier: "\\b(symbol(\\.(brackets|operator|tag))?)\\b"
|
|
17
|
+
- identifier: "\\b(identifier(\\.(class|macro|var))?)\\b"
|
|
18
|
+
- identifier: "\\b(constant(\\.(bool(\\.(true|false){1})?|number|specialChar|string(\\.url)?){1})?)\\b"
|
|
19
|
+
- identifier: "\\b(preproc(\\.shebang)?)\\b"
|
|
20
|
+
- identifier: "\\b(type(\\.keyword)?)\\b"
|
|
21
|
+
- constant.number: "\\b(|h|A|0x)+[0-9]+(|h|A)+\\b"
|
|
22
|
+
- constant.number: "\\b0x[0-9 a-f A-F]+\\b"
|
|
23
|
+
- comment:
|
|
24
|
+
start: "#"
|
|
25
|
+
end: "$"
|
|
26
|
+
rules:
|
|
27
|
+
- todo: "(FIXME|TODO|NOTE):?"
|
|
28
|
+
- constant.string:
|
|
29
|
+
start: "\""
|
|
30
|
+
end: "\""
|
|
31
|
+
skip: "\\\\."
|
|
32
|
+
rules:
|
|
33
|
+
- constant.specialChar: "\\\\."
|
|
34
|
+
- constant.number: "#[0-9 A-F a-f]+"
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
filetype: mpd
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "mpd\\.conf$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- statement: "\\b(user|group|bind_to_address|host|port|plugin|name|type)\\b"
|
|
8
|
+
- statement: "\\b((music|playlist)_directory|(db|log|state|pid|sticker)_file)\\b"
|
|
9
|
+
- special: "^(input|audio_output|decoder)[[:space:]]*\\{|\\}"
|
|
10
|
+
- constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
|
|
11
|
+
- comment: "(^|[[:space:]])#([^{].*)?$"
|
|
12
|
+
- indent-char.whitespace: "[[:space:]]+$"
|
|
13
|
+
- indent-char: " + +| + +"
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
filetype: nanorc
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.?nanorc$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- default: "(?i)^[[:space:]]*((un)?set|include|syntax|i?color).*$"
|
|
8
|
+
- type: "(?i)^[[:space:]]*(set|unset)[[:space:]]+(autoindent|backup|backupdir|backwards|boldtext|brackets|casesensitive|const|cut|fill|historylog|matchbrackets|morespace|mouse|multibuffer|noconvert|nofollow|nohelp|nonewlines|nowrap|operatingdir|preserve|punct)\\>|^[[:space:]]*(set|unset)[[:space:]]+(quickblank|quotestr|rebinddelete|rebindkeypad|regexp|smarthome|smooth|speller|suspend|tabsize|tabstospaces|tempfile|undo|view|whitespace|wordbounds)\\b"
|
|
9
|
+
- preproc: "(?i)^[[:space:]]*(set|unset|include|syntax|header)\\b"
|
|
10
|
+
- constant.bool.true: "(?i)(set)\\b"
|
|
11
|
+
- constant.bool.false: "(?i)(unset)\\b"
|
|
12
|
+
- identifier: "(?i)^[[:space:]]*(i)?color[[:space:]]*(bright)?(white|black|red|blue|green|yellow|magenta|cyan)?(,(white|black|red|blue|green|yellow|magenta|cyan))?\\b"
|
|
13
|
+
- special: "(?i)^[[:space:]]*(i)?color\\b|\\b(start|end)="
|
|
14
|
+
- constant.string: "\"(\\\\.|[^\"])*\""
|
|
15
|
+
- comment: "^[[:space:]]*#.*$"
|
|
16
|
+
- comment.bright: "^[[:space:]]*##.*$"
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
filetype: nftables
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "(nftables\\.(conf|rules)$|nftables(\\.rules)?\\.d/)"
|
|
5
|
+
header: "^(#!.*/(env +)?nft( |$)|flush +ruleset)"
|
|
6
|
+
|
|
7
|
+
rules:
|
|
8
|
+
- type: "\\b(chain|counter|map|rule|ruleset|set|table)\\b"
|
|
9
|
+
- type: "\\b(ether|inet|i(cm)?p(x|(v?(4|6))?)|tcp|udp|8021q)\\b"
|
|
10
|
+
- special: "\\b(element(s)?|hook|policy|priority|type|state)\\b"
|
|
11
|
+
- identifier: "\\b(ct|iif|iifname|meta|oif|oifname|th|dport|sport|saddr|daddr|l4proto)\\b"
|
|
12
|
+
- statement: "\\b(accept|drop|goto|jump|log|masquerade|reject|limit|queue)\\b"
|
|
13
|
+
- preproc: "\\b(add|define|flush|include|delete)\\b"
|
|
14
|
+
- symbol.operator: "[<>.&|^!=:;,@]|\\b(and|ge|gt|le|lt|or|xor)\\b"
|
|
15
|
+
- constant.string:
|
|
16
|
+
start: "\""
|
|
17
|
+
end: "\""
|
|
18
|
+
rules: []
|
|
19
|
+
# Integer Constants
|
|
20
|
+
- constant.number: "\\b([0-9]+)\\b"
|
|
21
|
+
- constant.number: "\\b(0x[0-9a-fA-F]+)\\b"
|
|
22
|
+
- identifier.var: "[$@][a-zA-Z_.][a-zA-Z0-9_/.-]*"
|
|
23
|
+
- comment: "(^|[[:space:]])#([^{].*)?$"
|
|
24
|
+
- indent-char.whitespace: "[[:space:]]+$"
|
|
25
|
+
- indent-char: " + +| + +"
|
|
26
|
+
- comment:
|
|
27
|
+
start: "#"
|
|
28
|
+
end: "$"
|
|
29
|
+
rules:
|
|
30
|
+
- todo: "(TODO|FIXME):?"
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
filetype: nginx
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "nginx.*\\.conf$|\\.nginx$|\\.sub(domain|folder)\\.conf$"
|
|
5
|
+
header: "^(server|upstream)[a-z ]*\\{$"
|
|
6
|
+
|
|
7
|
+
rules:
|
|
8
|
+
- preproc: "\\b(events|server|http|location|upstream)[[:space:]]*\\{"
|
|
9
|
+
- statement: "(^|[[:space:]{;])(access_log|add_after_body|add_before_body|add_header|addition_types|aio|alias|allow|ancient_browser|ancient_browser_value|auth_basic|auth_basic_user_file|autoindex|autoindex_exact_size|autoindex_localtime|break|charset|charset_map|charset_types|chunked_transfer_encoding|client_body_buffer_size|client_body_in_file_only|client_body_in_single_buffer|client_body_temp_path|client_body_timeout|client_header_buffer_size|client_header_timeout|client_max_body_size|connection_pool_size|create_full_put_path|daemon|dav_access|dav_methods|default_type|deny|directio|directio_alignment|disable_symlinks|empty_gif|env|error_log|error_page|expires|fastcgi_buffer_size|fastcgi_buffers|fastcgi_busy_buffers_size|fastcgi_cache|fastcgi_cache_bypass|fastcgi_cache_key|fastcgi_cache_lock|fastcgi_cache_lock_timeout|fastcgi_cache_min_uses|fastcgi_cache_path|fastcgi_cache_use_stale|fastcgi_cache_valid|fastcgi_connect_timeout|fastcgi_hide_header|fastcgi_ignore_client_abort|fastcgi_ignore_headers|fastcgi_index|fastcgi_intercept_errors|fastcgi_keep_conn|fastcgi_max_temp_file_size|fastcgi_next_upstream|fastcgi_no_cache|fastcgi_param|fastcgi_pass|fastcgi_pass_header|fastcgi_read_timeout|fastcgi_send_timeout|fastcgi_split_path_info|fastcgi_store|fastcgi_store_access|fastcgi_temp_file_write_size|fastcgi_temp_path|flv|geo|geoip_city|geoip_country|gzip|gzip_buffers|gzip_comp_level|gzip_disable|gzip_http_version|gzip_min_length|gzip_proxied|gzip_static|gzip_types|gzip_vary|if|if_modified_since|ignore_invalid_headers|image_filter|image_filter_buffer|image_filter_jpeg_quality|image_filter_sharpen|image_filter_transparency|include|index|internal|ip_hash|keepalive|keepalive_disable|keepalive_requests|keepalive_timeout|large_client_header_buffers|limit_conn|limit_conn_log_level|limit_conn_zone|limit_except|limit_rate|limit_rate_after|limit_req|limit_req_log_level|limit_req_zone|limit_zone|lingering_close|lingering_time|lingering_timeout|listen|location|log_format|log_not_found|log_subrequest|map|map_hash_bucket_size|map_hash_max_size|master_process|max_ranges|memcached_buffer_size|memcached_connect_timeout|memcached_next_upstream|memcached_pass|memcached_read_timeout|memcached_send_timeout|merge_slashes|min_delete_depth|modern_browser|modern_browser_value|mp4|mp4_buffer_size|mp4_max_buffer_size|msie_padding|msie_refresh|open_file_cache|open_file_cache_errors|open_file_cache_min_uses|open_file_cache_valid|open_log_file_cache|optimize_server_names|override_charset|pcre_jit|perl|perl_modules|perl_require|perl_set|pid|port_in_redirect|postpone_output|proxy_buffer_size|proxy_buffering|proxy_buffers|proxy_busy_buffers_size|proxy_cache|proxy_cache_bypass|proxy_cache_key|proxy_cache_lock|proxy_cache_lock_timeout|proxy_cache_min_uses|proxy_cache_path|proxy_cache_use_stale|proxy_cache_valid|proxy_connect_timeout|proxy_cookie_domain|proxy_cookie_path|proxy_hide_header|proxy_http_version|proxy_ignore_client_abort|proxy_ignore_headers|proxy_intercept_errors|proxy_max_temp_file_size|proxy_next_upstream|proxy_no_cache|proxy_pass|proxy_pass_header|proxy_read_timeout|proxy_redirect|proxy_send_timeout|proxy_set_header|proxy_ssl_session_reuse|proxy_store|proxy_store_access|proxy_temp_file_write_size|proxy_temp_path|random_index|read_ahead|real_ip_header|recursive_error_pages|request_pool_size|reset_timedout_connection|resolver|resolver_timeout|return|rewrite|root|satisfy|satisfy_any|secure_link_secret|send_lowat|send_timeout|sendfile|sendfile_max_chunk|server|server|server_name|server_name_in_redirect|server_names_hash_bucket_size|server_names_hash_max_size|server_tokens|set|set_real_ip_from|source_charset|split_clients|ssi|ssi_silent_errors|ssi_types|ssl|ssl_certificate|ssl_certificate_key|ssl_ciphers|ssl_client_certificate|ssl_crl|ssl_dhparam|ssl_engine|ssl_prefer_server_ciphers|ssl_protocols|ssl_session_cache|ssl_session_timeout|ssl_verify_client|ssl_verify_depth|sub_filter|sub_filter_once|sub_filter_types|tcp_nodelay|tcp_nopush|timer_resolution|try_files|types|types_hash_bucket_size|types_hash_max_size|underscores_in_headers|uninitialized_variable_warn|upstream|user|userid|userid_domain|userid_expires|userid_name|userid_p3p|userid_path|userid_service|valid_referers|variables_hash_bucket_size|variables_hash_max_size|worker_priority|worker_processes|worker_rlimit_core|worker_rlimit_nofile|working_directory|xml_entities|xslt_stylesheet|xslt_types)([[:space:]]|$)"
|
|
10
|
+
- constant.bool.true: "\\b(on)\\b"
|
|
11
|
+
- constant.bool.false: "\\b(off)\\b"
|
|
12
|
+
- identifier: "\\$[A-Za-z][A-Za-z0-9_]*"
|
|
13
|
+
- symbol: "[*]"
|
|
14
|
+
- constant-string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
|
|
15
|
+
- constant.string:
|
|
16
|
+
start: "'$"
|
|
17
|
+
end: "';$"
|
|
18
|
+
rules: []
|
|
19
|
+
|
|
20
|
+
- comment: "(^|[[:space:]])#([^{].*)?$"
|
|
21
|
+
- indent-char.whitespace: "[[:space:]]+$"
|
|
22
|
+
- indent-char: " + +| + +"
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
filetype: nim
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.nims?$|nim.cfg"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- preproc: "[\\{\\|]\\b(atom|lit|sym|ident|call|lvalue|sideeffect|nosideeffect|param|genericparam|module|type|let|var|const|result|proc|method|iterator|converter|macro|template|field|enumfield|forvar|label|nk[a-zA-Z]+|alias|noalias)\\b[\\}\\|]"
|
|
8
|
+
- statement: "\\b(addr|and|as|asm|atomic|bind|block|break|case|cast|concept|const|continue|converter|defer|discard|distinct|div|do|elif|else|end|enum|except|export|finally|for|from|func|generic|if|import|in|include|interface|is|isnot|iterator|let|macro|method|mixin|mod|nil|not|notin|object|of|or|out|proc|ptr|raise|ref|return|shl|shr|static|template|try|tuple|type|using|var|when|while|with|without|xor|yield)\\b"
|
|
9
|
+
- statement: "\\b(deprecated|noSideEffect|constructor|destructor|override|procvar|compileTime|noReturn|acyclic|final|shallow|pure|asmNoStackFrame|error|fatal|warning|hint|line|linearScanEnd|computedGoto|unroll|immediate|checks|boundsChecks|overflowChecks|nilChecks|assertations|warnings|hints|optimization|patterns|callconv|push|pop|global|pragma|experimental|bitsize|volatile|noDecl|header|incompleteStruct|compile|link|passC|passL|emit|importc|importcpp|importobjc|codegenDecl|injectStmt|intdefine|strdefine|varargs|exportc|extern|bycopy|byref|union|packed|unchecked|dynlib|cdecl|thread|gcsafe|threadvar|guard|locks|compileTime)\\b"
|
|
10
|
+
- symbol.operator: "[=\\+\\-\\*/<>@\\$~&%\\|!\\?\\^\\.:\\\\]+"
|
|
11
|
+
- special: "\\{\\.|\\.\\}|\\[\\.|\\.\\]|\\(\\.|\\.\\)|;|,|`"
|
|
12
|
+
- statement: "\\.\\."
|
|
13
|
+
- type: "\\b(int|cint|int8|int16|int32|int64|uint|uint8|uint16|uint32|uint64|float|float32|float64|bool|char|enum|string|cstring|cstringArray|cdouble|csize_t|pointer|array|openarray|seq|varargs|tuple|object|set|void|auto|cshort|clong|range|nil|T|untyped|typedesc)\\b"
|
|
14
|
+
- type: "'[iI](8|16|32|64)?\\b|'[uU](8|16|32|64)?\\b|'[fF](32|64|128)?\\b|'[dD]\\b"
|
|
15
|
+
- constant.number: "\\b[0-9]+\\b"
|
|
16
|
+
- constant.number: "\\b0[xX][0-9A-Fa-f][0-9_A-Fa-f]+\\b"
|
|
17
|
+
- constant.number: "\\b0[ocC][0-7][0-7_]+\\b"
|
|
18
|
+
- constant.number: "\\b0[bB][01][01_]+\\b"
|
|
19
|
+
- constant.number: "\\b[0-9_]((\\.?)[0-9_]+)?[eE][+\\-][0-9][0-9_]+\\b"
|
|
20
|
+
- constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
|
|
21
|
+
- comment: "[[:space:]]*(?:[^\\\\]|^)#.*$"
|
|
22
|
+
- comment:
|
|
23
|
+
start: "\\#\\["
|
|
24
|
+
end: "\\]\\#"
|
|
25
|
+
rules: []
|
|
26
|
+
|
|
27
|
+
- todo: "(TODO|FIXME|XXX):?"
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
filetype: nix
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.nix$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- special: "\\b(Ellipsis|null|self|super|true|false|abort)\\b"
|
|
8
|
+
- statement: "\\b(let|in|with|import|rec|inherit)\\b"
|
|
9
|
+
- symbol.operator: "([~^.:;,+*|=!\\%@]|<|>|/|-|&)"
|
|
10
|
+
- symbol.brackets: "([(){}]|\\[|\\])"
|
|
11
|
+
|
|
12
|
+
- constant.number: "\\b[0-9](_?[0-9])*(\\.([0-9](_?[0-9])*)?)?(e[0-9](_?[0-9])*)?\\b"
|
|
13
|
+
|
|
14
|
+
- constant.string:
|
|
15
|
+
start: "\""
|
|
16
|
+
end: "\""
|
|
17
|
+
rules: []
|
|
18
|
+
|
|
19
|
+
- constant.string:
|
|
20
|
+
start: "''"
|
|
21
|
+
end: "''"
|
|
22
|
+
rules: []
|
|
23
|
+
|
|
24
|
+
- comment:
|
|
25
|
+
start: "#"
|
|
26
|
+
end: "$"
|
|
27
|
+
rules: []
|
|
28
|
+
|
|
29
|
+
- comment:
|
|
30
|
+
start: "/\\*"
|
|
31
|
+
end: "\\*/"
|
|
32
|
+
rules: []
|