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,87 @@
|
|
|
1
|
+
filetype: B
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: '\.b$'
|
|
5
|
+
# core control words + storage classes (Thompson B-ish)
|
|
6
|
+
signature: '\b(if|else|while|switch|case|default|break|return|goto|extrn|auto)\b'
|
|
7
|
+
|
|
8
|
+
rules:
|
|
9
|
+
# -------------------------
|
|
10
|
+
# Comments (B: /* ... */)
|
|
11
|
+
# -------------------------
|
|
12
|
+
- comment:
|
|
13
|
+
start: '/\*'
|
|
14
|
+
end: '\*/'
|
|
15
|
+
rules: []
|
|
16
|
+
|
|
17
|
+
# Optional: // line comments (convenient, not “original” B)
|
|
18
|
+
- comment:
|
|
19
|
+
start: '//'
|
|
20
|
+
end: '$'
|
|
21
|
+
rules: []
|
|
22
|
+
|
|
23
|
+
# -------------------------
|
|
24
|
+
# Strings + escapes
|
|
25
|
+
# -------------------------
|
|
26
|
+
- constant.string:
|
|
27
|
+
start: '"'
|
|
28
|
+
end: '"'
|
|
29
|
+
skip: '\\\\.'
|
|
30
|
+
rules:
|
|
31
|
+
# common escapes: \n \t \e \r \0 \" \\ \( \) \*
|
|
32
|
+
- constant.specialChar: '\\\\([0netr"\\\\\\*\\(\\)])'
|
|
33
|
+
# printf-ish: %s %c %d %o and %%
|
|
34
|
+
- constant.specialChar: '%(%|[scdo])'
|
|
35
|
+
|
|
36
|
+
- constant.string:
|
|
37
|
+
start: "'"
|
|
38
|
+
end: "'"
|
|
39
|
+
skip: '\\\\.'
|
|
40
|
+
rules:
|
|
41
|
+
- constant.specialChar: '\\\\([0netr"\\\\\\*\\(\\)])'
|
|
42
|
+
- constant.specialChar: '%(%|[scdo])'
|
|
43
|
+
|
|
44
|
+
# -------------------------
|
|
45
|
+
# Numbers
|
|
46
|
+
# (leading 0 commonly used for octal constants)
|
|
47
|
+
# -------------------------
|
|
48
|
+
- constant.number: '\b0[0-7]+\b'
|
|
49
|
+
- constant.number: '\b[0-9]+\b'
|
|
50
|
+
|
|
51
|
+
# -------------------------
|
|
52
|
+
# Keywords / storage (keep tight + old-school)
|
|
53
|
+
# -------------------------
|
|
54
|
+
- statement: '\b(if|else|while|switch|case|default|break|return|goto)\b'
|
|
55
|
+
- type: '\b(extrn|auto)\b'
|
|
56
|
+
|
|
57
|
+
# -------------------------
|
|
58
|
+
# Common B library calls (/etc/libb.a era list)
|
|
59
|
+
# -------------------------
|
|
60
|
+
- constant.builtin: '\b(char|getchr|putchr|exit|printf|seek|setuid|stat|time|unlink|wait|lchar|chdir|chmod|chown|close|creat|execl|execv|fork|fstat|getuid|intr|link|makdir|open|read|write|ctime)\b'
|
|
61
|
+
|
|
62
|
+
# -------------------------
|
|
63
|
+
# Labels and function-ish identifiers
|
|
64
|
+
# -------------------------
|
|
65
|
+
# label (often at bol)
|
|
66
|
+
- identifier: '^\s*[_A-Za-z][_A-Za-z0-9]*\s*:'
|
|
67
|
+
# function call/def name before '('
|
|
68
|
+
- identifier: '\b[_A-Za-z][_A-Za-z0-9]*\s*\('
|
|
69
|
+
|
|
70
|
+
# -------------------------
|
|
71
|
+
# Operators (order matters: longer first)
|
|
72
|
+
# Thompson-ish assignment operators in B are =+, =-, =*, =/, =%, =<<, =>>, =& , =|
|
|
73
|
+
# -------------------------
|
|
74
|
+
- symbol.operator: '(=<<|=>>|=\+|=-|=\*|=/|=%|=&|=\|)'
|
|
75
|
+
- symbol.operator: '(==|!=|<=|>=|<<|>>)'
|
|
76
|
+
- symbol.operator: '(\+\+|--|\*\*)'
|
|
77
|
+
- symbol.operator: '[-+*/%&|^~!=<>?:=]'
|
|
78
|
+
|
|
79
|
+
# -------------------------
|
|
80
|
+
# Brackets
|
|
81
|
+
# -------------------------
|
|
82
|
+
- symbol.brackets: '[(){}\[\]]'
|
|
83
|
+
|
|
84
|
+
# -------------------------
|
|
85
|
+
# Identifiers / variables (last so keywords win)
|
|
86
|
+
# -------------------------
|
|
87
|
+
- identifier: '\b[_A-Za-z][_A-Za-z0-9]*\b'
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
filetype: batch
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "(\\.bat$|\\.cmd$)"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
# Numbers
|
|
8
|
+
- constant.number: "\\b[0-9]+\\b"
|
|
9
|
+
# Brackets and symbols
|
|
10
|
+
- special: "(\\{|\\}|\\(|\\)|\\;|\\]|\\[|`|\\\\|\\$|<|>|!|=|&|\\|)"
|
|
11
|
+
# Conditionals and control flow
|
|
12
|
+
# note (?i) means case insensitive match
|
|
13
|
+
- type: "\\b(?i)(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|then|until|while)\\b"
|
|
14
|
+
- type: "\\b(?i)(equ|neq|lss|leq|gtr|geq|on|off)\\b"
|
|
15
|
+
- type: "\\b(?i)(goto|for|in|do|call|exit|not|exist|errorlevel|defined)\\b"
|
|
16
|
+
- type: "\\b(?i)(prn|nul|lpt3|lpt2|lpt1|con|com4|com3|com2|com1|aux)\\b"
|
|
17
|
+
# keywords
|
|
18
|
+
- statement: "\\b(?i)(adprep|append|arp|assoc|at|atmadm|attrib|auditpol|autochk|autoconv|autofmt|bcdboot|bcdedit|bdehdcfg|bitsadmin|bootcfg|break|brea)\\b"
|
|
19
|
+
- statement: "\\b(?i)(cacls|cd|certreq|certutil|chcp|change|choice|cipher|chdir|chkdsk|chkntfs|chglogon|chgport|chgusr|clip|cls|clscluadmin|cluster|cmd|cmdkey|cmstp|color)\\b"
|
|
20
|
+
- statement: "\\b(?i)(comp|compact|convert|copy|cprofile|cscript|csvde|date|dcdiag|dcgpofix|dcpromo|defra|del|dfscmd|dfsdiag|dfsrmig|diantz|dir|dirquota|diskcomp|diskcopy|diskpart|diskperf|diskraid|diskshadow|dispdiag|doin|dnscmd|doskey|driverquery|dsacls|dsadd|dsamain|dsdbutil|dsget|dsmgmt|dsmod|dsmove|dsquery|dsrm)\\b"
|
|
21
|
+
- statement: "\\b(?i)(echo|edit|endlocal|erase|esentutl|eventcreate|eventquery|eventtriggers|evntcmd|expand|extract)\\b"
|
|
22
|
+
- statement: "\\b(?i)(fc|filescrn|find|findstr|finger|flattemp|fonde|forfiles|format|freedisk|fs|fsutil|ftp|ftype|fveupdate|getmac|gettype|gpfixup|gpresult|gpupdate|graftabl)\\b"
|
|
23
|
+
- statement: "\\b(?i)(hashgen|hep|help|helpctr|hostname|icacls|iisreset|inuse|ipconfig|ipxroute|irftp|ismserv|jetpack|keyb|klist|ksetup|ktmutil|ktpass|label|ldifd|ldp|lodctr|logman|logoff|lpq|lpr|macfile)\\b"
|
|
24
|
+
- statement: "\\b(?i)(makecab|manage-bde|mapadmin|md|mkdir|mklink|mmc|mode|more|mount|mountvol|move|mqbup|mqsvc|mqtgsvc|msdt|msg|msiexec|msinfo32|mstsc|nbtstat|net computer|net group)\\b"
|
|
25
|
+
- statement: "\\b(?i)(net localgroup|net print|net session|net share|net start|net stop|net use|net user|net view|net|netcfg|netdiag|netdom|netsh|netstat|nfsadmin|nfsshare|nfsstat|nlb)\\b"
|
|
26
|
+
- statement: "\\b(?i)(nlbmgr|nltest|nslookup|ntackup|ntcmdprompt|ntdsutil|ntfrsutl|openfiles|pagefileconfig|path|pathping|pause|pbadmin|pentnt|perfmon|ping|pnpunatten|pnputil|popd)\\b"
|
|
27
|
+
- statement: "\\b(?i)(powercfg|powershell|powershell_ise|print|prncnfg|prndrvr|prnjobs|prnmngr|prnport|prnqctl|prompt|pubprn|pushd|pushprinterconnections|pwlauncher|qappsrv|qprocess)\\b"
|
|
28
|
+
- statement: "\\b(?i)(query|quser|qwinsta|rasdial|rcp|rd|rdpsign|regentc|recover|redircmp|redirusr|reg|regini|regsvr32|relog|ren|rename|rendom|repadmin|repair-bde|replace|reset|restore)\\b"
|
|
29
|
+
- statement: "\\b(?i)(rxec|risetup|rmdir|robocopy|route|rpcinfo|rpcping|rsh|runas|rundll32|rwinsta|scp|sc|setlocal|session|schtasks|scwcmd|secedit|serverceipoptin|servrmanagercmd|serverweroptin|set|setspn)\\b"
|
|
30
|
+
- statement: "\\b(?i)(setx|sfc|shadow|shift|showmount|shutdown|sort|ssh|start|storrept|subst|sxstrace|ysocmgr|systeminfo|takeown|tapicfg|taskkill|tasklist|tcmsetup|telnet|tftp|time)\\b"
|
|
31
|
+
- statement: "\\b(?i)(timeout|title|tlntadmn|tpmvscmgr|tpmvscmgr|tacerpt|tracert|tree|tscon|tsdiscon|tsecimp|tskill|tsprof|type|typeperf|tzutil|uddiconfig|umount|unlodctr|ver|verify)\\b"
|
|
32
|
+
- statement: "\\b(?i)(verifier|verif|vol|vssadmin|w32tm|waitfor|wbadmin|wdsutil|wecutil|wevtutil|where|whoami|winnt|winnt32|winpop|winrm|winrs|winsat|wlbs|mic|wscript|xcopy)\\b"
|
|
33
|
+
# / Flags
|
|
34
|
+
- constant: "(/\\w+)"
|
|
35
|
+
# Variables
|
|
36
|
+
- special: "(%%\\w+)"
|
|
37
|
+
- special: "(%\\w+%)"
|
|
38
|
+
# Conditional flags
|
|
39
|
+
- type: "--[a-z-]+"
|
|
40
|
+
- type: "\\ -[a-z]+"
|
|
41
|
+
|
|
42
|
+
- identifier: "\\$\\{?[0-9A-Z_!@#$*?-]+\\}?"
|
|
43
|
+
- identifier: "\\$\\{?[0-9A-Z_!@#$*?-]+\\}?"
|
|
44
|
+
# "" String
|
|
45
|
+
- constant.string:
|
|
46
|
+
start: \"
|
|
47
|
+
end: \"
|
|
48
|
+
skip: \.
|
|
49
|
+
rules:
|
|
50
|
+
- constant.specialChar: (\\0|\\\\|\\t|\\n|\\r|\\"|\\')
|
|
51
|
+
- constant.unicode: \\u\{[[:xdigit:]]+}
|
|
52
|
+
# '' string
|
|
53
|
+
- constant.string: "(\\'.+\\')"
|
|
54
|
+
# rem as comment
|
|
55
|
+
- comment.rem: "(?i)(rem\\s.*)"
|
|
56
|
+
# :: as comment
|
|
57
|
+
- comment.rem: "(?i)(\\:\\:\\s.*)"
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
filetype: c
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "(\\.(c|C)$|\\.(h|H)$|\\.ii?$|\\.(def)$)"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- identifier: "\\b[A-Z_][0-9A-Z_]+\\b"
|
|
8
|
+
- type: "\\b(_Atomic|_BitInt|float|double|_Decimal32|_Decimal64|_Decimal128|_Complex|complex|_Imaginary|imaginary|_Bool|bool|char|int|short|long|enum|void|struct|union|typedef|typeof|typeof_unqual|(un)?signed|inline|_Noreturn)\\b"
|
|
9
|
+
- type: "\\b((s?size)|((u_?)?int(8|16|32|64|ptr))|char(8|16|32)|wchar)_t\\b"
|
|
10
|
+
# GCC float/decimal/fixed types
|
|
11
|
+
- type: "\\b(_Float16|__fp16|_Float32|_Float32x|_Float64|_Float64x|__float80|_Float128|_Float128x|__float128|__ibm128|__int128|_Fract|_Sat|_Accum)\\b"
|
|
12
|
+
- type: "\\b[a-z_][0-9a-z_]+(_t|_T)\\b"
|
|
13
|
+
- statement: "\\b(auto|volatile|register|restrict|_Alignas|alignas|_Alignof|alignof|static|const|constexpr|extern|_Thread_local|thread_local)\\b"
|
|
14
|
+
- statement: "\\b(for|if|while|do|else|case|default|switch|_Generic|_Static_assert|static_assert)\\b"
|
|
15
|
+
- statement: "\\b(goto|continue|break|return)\\b"
|
|
16
|
+
- statement: "\\b(asm|fortran)\\b"
|
|
17
|
+
- preproc: "^[[:space:]]*#[[:space:]]*(define|embed|pragma|include|(un|ifn?)def|endif|el(if|ifdef|ifndef|se)|if|line|warning|error|__has_include|__has_embed|__has_c_attribute)"
|
|
18
|
+
- preproc: "^[[:space:]]*_Pragma\\b"
|
|
19
|
+
# GCC builtins
|
|
20
|
+
- statement: "__attribute__[[:space:]]*\\(\\([^)]*\\)\\)"
|
|
21
|
+
- statement: "__(aligned|asm|builtin|extension|hidden|inline|packed|restrict|section|typeof|weak)__"
|
|
22
|
+
# Operator Color
|
|
23
|
+
- symbol.operator: "[-+*/%=<>.:;,~&|^!?]|\\b(offsetof|sizeof)\\b"
|
|
24
|
+
- symbol.brackets: "[(){}]|\\[|\\]"
|
|
25
|
+
# Integer Constants
|
|
26
|
+
- constant.number: "(\\b([1-9][0-9]*|0[0-7]*|0[Xx][0-9A-Fa-f]+|0[Bb][01]+)([Uu][Ll]?[Ll]?|[Ll][Ll]?[Uu]?)?\\b)"
|
|
27
|
+
# Decimal Floating Constants
|
|
28
|
+
- constant.number: "(\\b(([0-9]*[.][0-9]+|[0-9]+[.][0-9]*)([Ee][+-]?[0-9]+)?|[0-9]+[Ee][+-]?[0-9]+)[FfLl]?\\b)"
|
|
29
|
+
# Hexadecimal Floating Constants
|
|
30
|
+
- constant.number: "(\\b0[Xx]([0-9A-Za-z]*[.][0-9A-Za-z]+|[0-9A-Za-z]+[.][0-9A-Za-z]*)[Pp][+-]?[0-9]+[FfLl]?\\b)"
|
|
31
|
+
- constant.bool: "(\\b(true|false|NULL|nullptr|TRUE|FALSE)\\b)"
|
|
32
|
+
|
|
33
|
+
- constant.string:
|
|
34
|
+
start: "\""
|
|
35
|
+
end: "\""
|
|
36
|
+
skip: "\\\\."
|
|
37
|
+
rules:
|
|
38
|
+
- constant.specialChar: "\\\\([\"'abfnrtv\\\\]|[0-3]?[0-7]{1,2}|x[0-9A-Fa-f]{1,2}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})"
|
|
39
|
+
|
|
40
|
+
- constant.string:
|
|
41
|
+
start: "'"
|
|
42
|
+
end: "'"
|
|
43
|
+
skip: "\\\\."
|
|
44
|
+
rules:
|
|
45
|
+
# TODO: Revert back to - error: "..+" once #3127 is merged
|
|
46
|
+
- error: "[[:graph:]]{2,}'"
|
|
47
|
+
- constant.specialChar: "\\\\([\"'abfnrtv\\\\]|[0-3]?[0-7]{1,2}|x[0-9A-Fa-f]{1,2}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})"
|
|
48
|
+
|
|
49
|
+
- comment:
|
|
50
|
+
start: "//"
|
|
51
|
+
end: "$"
|
|
52
|
+
rules:
|
|
53
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
54
|
+
|
|
55
|
+
- comment:
|
|
56
|
+
start: "/\\*"
|
|
57
|
+
end: "\\*/"
|
|
58
|
+
rules:
|
|
59
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
60
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
filetype: caddyfile
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "Caddyfile"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- identifier: "^\\s*\\S+(\\s|$)"
|
|
8
|
+
- type: "^([\\w.:/-]+,? ?)+[,{]$"
|
|
9
|
+
- constant.specialChar: "\\s{$"
|
|
10
|
+
- constant.specialChar: "^\\s*}$"
|
|
11
|
+
- constant.string:
|
|
12
|
+
start: "\""
|
|
13
|
+
end: "\""
|
|
14
|
+
skip: "\\\\."
|
|
15
|
+
rules:
|
|
16
|
+
- constant.specialChar: "\\\\."
|
|
17
|
+
|
|
18
|
+
- preproc: "\\{(\\w+|\\$\\w+|%\\w+%)\\}"
|
|
19
|
+
- comment:
|
|
20
|
+
start: "#"
|
|
21
|
+
end: "$"
|
|
22
|
+
rules: []
|
|
23
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
filetype: clojure
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.(clj[sc]?|edn)$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
|
|
8
|
+
# Constants
|
|
9
|
+
- constant.bool: "\\b(true|false)\\b"
|
|
10
|
+
- constant.macro: "\\b(nil)\\b"
|
|
11
|
+
# Valid numbers
|
|
12
|
+
- constant.number: "[\\-]?[0-9]+?\\b"
|
|
13
|
+
- constant.number: "0x[0-9][A-Fa-f]+?\\b"
|
|
14
|
+
- constant.number: "[\\-]?(3[0-6]|2[0-9]|1[0-9]|[2-9])r[0-9A-Z]+?\\b"
|
|
15
|
+
# Invalid numbers
|
|
16
|
+
- error: "[\\-]?([4-9][0-9]|3[7-9]|1|0)r[0-9A-Z]+?\\b"
|
|
17
|
+
|
|
18
|
+
# Symbols
|
|
19
|
+
- symbol.operator: "[=>+\\-*/'?]"
|
|
20
|
+
|
|
21
|
+
# Types/casting
|
|
22
|
+
- type: "\\b(byte|short|(big)?int(eger)?|long|float|num|bigdec|rationalize)\\b"
|
|
23
|
+
|
|
24
|
+
# String highlighting
|
|
25
|
+
- constant.string:
|
|
26
|
+
start: "\""
|
|
27
|
+
end: "\""
|
|
28
|
+
skip: "\\\\."
|
|
29
|
+
rules:
|
|
30
|
+
- constant.specialChar: "(\\\\u[0-9A-fa-f]{4,4}|\\\\newline|\\\\space|\\\\tab|\\\\formfeed|\\\\backspace|\\\\return|\\\\.)"
|
|
31
|
+
|
|
32
|
+
# Comments
|
|
33
|
+
- comment:
|
|
34
|
+
start: ";"
|
|
35
|
+
end: "$"
|
|
36
|
+
rules:
|
|
37
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
38
|
+
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
filetype: cmake
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "(CMakeLists\\.txt|\\.cmake)$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- identifier.var: "^[[:space:]]*[A-Z0-9_]+"
|
|
8
|
+
- preproc: "^[[:space:]]*(include|include_directories|include_external_msproject)\\b"
|
|
9
|
+
|
|
10
|
+
- statement: "^[[:space:]]*\\b((else|end)?if|else|(end)?while|(end)?foreach|break)\\b"
|
|
11
|
+
- statement: "\\b(COPY|NOT|COMMAND|PROPERTY|POLICY|TARGET|EXISTS|IS_(DIRECTORY|ABSOLUTE)|DEFINED)\\b[[:space:]]"
|
|
12
|
+
- statement: "[[:space:]]\\b(OR|AND|IS_NEWER_THAN|MATCHES|(STR|VERSION_)?(LESS|GREATER|EQUAL))\\b[[:space:]]"
|
|
13
|
+
|
|
14
|
+
- special: "^[[:space:]]*\\b((end)?(function|macro)|return)"
|
|
15
|
+
|
|
16
|
+
- constant.string:
|
|
17
|
+
start: "\""
|
|
18
|
+
end: "\""
|
|
19
|
+
skip: "\\\\."
|
|
20
|
+
rules:
|
|
21
|
+
- constant.specialChar: "\\\\."
|
|
22
|
+
|
|
23
|
+
- constant.string:
|
|
24
|
+
start: "'"
|
|
25
|
+
end: "'"
|
|
26
|
+
skip: "\\\\."
|
|
27
|
+
rules:
|
|
28
|
+
- constant.specialChar: "\\\\."
|
|
29
|
+
|
|
30
|
+
- preproc:
|
|
31
|
+
start: "\\$(\\{|ENV\\{)"
|
|
32
|
+
end: "\\}"
|
|
33
|
+
rules: []
|
|
34
|
+
|
|
35
|
+
- identifier.macro: "\\b(APPLE|UNIX|WIN32|CYGWIN|BORLAND|MINGW|MSVC(_IDE|60|71|80|90)?)\\b"
|
|
36
|
+
|
|
37
|
+
- comment:
|
|
38
|
+
start: "#"
|
|
39
|
+
end: "$"
|
|
40
|
+
rules:
|
|
41
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
42
|
+
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
filetype: coffeescript
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.coffee$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- symbol.operator: "([-+/*=<>!~%?:&|]|[.]{3})|\\b(and|or|is|isnt|not)\\b"
|
|
8
|
+
- identifier.class: "([A-Za-z_][A-Za-z0-9_]*:[[:space:]]*(->|\\()|->)"
|
|
9
|
+
- symbol.brackets: "[()]"
|
|
10
|
+
|
|
11
|
+
- statement: "\\b(await|when|catch|continue|debugger|default|by|until)\\b"
|
|
12
|
+
- statement: "\\b(delete|do|else|export|finally|for|class|extends|while|then)\\b"
|
|
13
|
+
- statement: "\\b(get|if|import|from|in|instanceof|new|reject|resolve|return)\\b"
|
|
14
|
+
- statement: "\\b(set|super|switch|this|throw|try|typeof|with|yield|unless)\\b"
|
|
15
|
+
|
|
16
|
+
- constant.bool: "\\b(true|false|yes|no|on|off)\\b"
|
|
17
|
+
- constant.bool.false: "\\b(false|no|off)\\b"
|
|
18
|
+
- constant.bool.true: "\\b(true|yes|on)\\b"
|
|
19
|
+
|
|
20
|
+
- constant.number: "\\b[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\\b"
|
|
21
|
+
- constant.number: "\\b[-+]?([0-9]+\\.[0-9]*|[0-9]*\\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?"
|
|
22
|
+
- constant.number: "\\b[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?"
|
|
23
|
+
- identifier: "@[A-Za-z0-9_]*"
|
|
24
|
+
|
|
25
|
+
- error: "\\b(enum|implements|interface|package|private|protected|public)"
|
|
26
|
+
- constant: "\\b(globalThis|Infinity|null|undefined|NaN)\\b"
|
|
27
|
+
- constant: "\\b(null|undefined|NaN)\\b"
|
|
28
|
+
- constant: "\\b(true|false|yes|no|on|off)\\b"
|
|
29
|
+
- type: "\\b(Array|Boolean|Date|Enumerator|Error|Function|Generator|Map|Math)\\b"
|
|
30
|
+
- type: "\\b(Number|Object|Promise|Proxy|Reflect|RegExp|Set|String|Symbol|WeakMap|WeakSet)\\b"
|
|
31
|
+
- type: "\\b(BigInt64Array|BigUint64Array|Float32Array|Float64Array|Int16Array)\\b"
|
|
32
|
+
|
|
33
|
+
- constant.string:
|
|
34
|
+
start: "\""
|
|
35
|
+
end: "\""
|
|
36
|
+
skip: "\\\\."
|
|
37
|
+
rules:
|
|
38
|
+
- constant.specialChar: "\\\\."
|
|
39
|
+
|
|
40
|
+
- constant.string:
|
|
41
|
+
start: "'"
|
|
42
|
+
end: "'"
|
|
43
|
+
skip: "\\\\."
|
|
44
|
+
rules:
|
|
45
|
+
- constant.specialChar: "\\\\."
|
|
46
|
+
|
|
47
|
+
- comment:
|
|
48
|
+
start: "###"
|
|
49
|
+
end: "###"
|
|
50
|
+
rules: []
|
|
51
|
+
|
|
52
|
+
- comment:
|
|
53
|
+
start: "#"
|
|
54
|
+
end: "$"
|
|
55
|
+
rules:
|
|
56
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
filetype: colortest
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "ColorTest$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- black: "\\bPLAIN\\b"
|
|
8
|
+
- red: "\\bred\\b"
|
|
9
|
+
- green: "\\bgreen\\b"
|
|
10
|
+
- yellow: "\\byellow\\b"
|
|
11
|
+
- blue: "\\bblue\\b"
|
|
12
|
+
- magenta: "\\bmagenta\\b"
|
|
13
|
+
- cyan: "\\bcyan\\b"
|
|
14
|
+
- brightred: "\\bbrightred\\b"
|
|
15
|
+
- brightgreen: "\\bbrightgreen\\b"
|
|
16
|
+
- brightyellow: "\\bbrightyellow\\b"
|
|
17
|
+
- brightblue: "\\bbrightblue\\b"
|
|
18
|
+
- brightmagenta: "\\bbrightmagenta\\b"
|
|
19
|
+
- brightcyan: "\\bbrightcyan\\b"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
filetype: conky
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "(\\.*conkyrc.*$|conky.conf)"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- type: "\\b(alignment|append_file|background|border_inner_margin|border_outer_margin|border_width|color0|color1|color2|color3|color4|color5|color6|color7|color8|color9|colorN|cpu_avg_samples|default_bar_height|default_bar_width|default_color|default_gauge_height|default_gauge_width|default_graph_height|default_graph_width|default_outline_color|default_shade_color|diskio_avg_samples|display|double_buffer|draw_borders|draw_graph_borders|draw_outline|draw_shades|extra_newline|font|format_human_readable|gap_x|gap_y|http_refresh|if_up_strictness|imap|imlib_cache_flush_interval|imlib_cache_size|lua_draw_hook_post|lua_draw_hook_pre|lua_load|lua_shutdown_hook|lua_startup_hook|mail_spool|max_port_monitor_connections|max_text_width|max_user_text|maximum_width|minimum_height|minimum_width|mpd_host|mpd_password|mpd_port|music_player_interval|mysql_host|mysql_port|mysql_user|mysql_password|mysql_db|net_avg_samples|no_buffers|nvidia_display|out_to_console|out_to_http|out_to_ncurses|out_to_stderr|out_to_x|override_utf8_locale|overwrite_file|own_window|own_window_class|own_window_colour|own_window_hints|own_window_title|own_window_transparent|own_window_type|pad_percents|pop3|sensor_device|short_units|show_graph_range|show_graph_scale|stippled_borders|temperature_unit|template|template0|template1|template2|template3|template4|template5|template6|template7|template8|template9|text|text_buffer_size|times_in_seconds|top_cpu_separate|top_name_width|total_run_times|update_interval|update_interval_on_battery|uppercase|use_spacer|use_xft|xftalpha|xftfont)\\b"
|
|
8
|
+
|
|
9
|
+
# Configuration item constants
|
|
10
|
+
- statement: "\\b(above|below|bottom_left|bottom_right|bottom_middle|desktop|dock|no|none|normal|override|skip_pager|skip_taskbar|sticky|top_left|top_right|top_middle|middle_left|middle_right|middle_middle|undecorated|yes)\\b"
|
|
11
|
+
|
|
12
|
+
# Variables
|
|
13
|
+
- preproc: "\\b(acpiacadapter|acpifan|acpitemp|addr|addrs|alignc|alignr|apcupsd|apcupsd_cable|apcupsd_charge|apcupsd_lastxfer|apcupsd_linev|apcupsd_load|apcupsd_loadbar|apcupsd_loadgauge|apcupsd_loadgraph|apcupsd_model|apcupsd_name|apcupsd_status|apcupsd_temp|apcupsd_timeleft|apcupsd_upsmode|apm_adapter|apm_battery_life|apm_battery_time|audacious_bar|audacious_bitrate|audacious_channels|audacious_filename|audacious_frequency|audacious_length|audacious_length_seconds|audacious_main_volume|audacious_playlist_length|audacious_playlist_position|audacious_position|audacious_position_seconds|audacious_status|audacious_title|battery|battery_bar|battery_percent|battery_short|battery_time|blink|bmpx_album|bmpx_artist|bmpx_bitrate|bmpx_title|bmpx_track|bmpx_uri|buffers|cached|cmdline_to_pid|color|color0|color1|color2|color3|color4|color5|color6|color7|color8|color9|combine|conky_build_arch|conky_build_date|conky_version|cpu|cpubar|cpugauge|cpugraph|curl|desktop|desktop_name|desktop_number|disk_protect|diskio|diskio_read|diskio_write|diskiograph|diskiograph_read|diskiograph_write|distribution|downspeed|downspeedf|downspeedgraph|draft_mails|else|endif|entropy_avail|entropy_bar|entropy_perc|entropy_poolsize|eval|eve|exec|execbar|execgauge|execgraph|execi|execibar|execigauge|execigraph|execp|execpi|flagged_mails|font|format_time|forwarded_mails|freq|freq_g|fs_bar|fs_bar_free|fs_free|fs_free_perc|fs_size|fs_type|fs_used|fs_used_perc|goto|gw_iface|gw_ip|hddtemp|head|hr|hwmon|i2c|i8k_ac_status|i8k_bios|i8k_buttons_status|i8k_cpu_temp|i8k_left_fan_rpm|i8k_left_fan_status|i8k_right_fan_rpm|i8k_right_fan_status|i8k_serial|i8k_version|ibm_brightness|ibm_fan|ibm_temps|ibm_volume|ical|iconv_start|iconv_stop|if_empty|if_existing|if_gw|if_match|if_mixer_mute|if_mounted|if_mpd_playing|if_running|if_smapi_bat_installed|if_up|if_updatenr|if_xmms2_connected|image|imap_messages|imap_unseen|ioscheduler|irc|kernel|laptop_mode|lines|loadavg|loadgraph|lua|lua_bar|lua_gauge|lua_graph|lua_parse|machine|mails|mboxscan|mem|memwithbuffers|membar|memwithbuffersbar|memeasyfree|memfree|memgauge|memgraph|memmax|memperc|mixer|mixerbar|mixerl|mixerlbar|mixerr|mixerrbar|moc_album|moc_artist|moc_bitrate|moc_curtime|moc_file|moc_rate|moc_song|moc_state|moc_timeleft|moc_title|moc_totaltime|monitor|monitor_number|mpd_album|mpd_artist|mpd_bar|mpd_bitrate|mpd_elapsed|mpd_file|mpd_length|mpd_name|mpd_percent|mpd_random|mpd_repeat|mpd_smart|mpd_status|mpd_title|mpd_track|mpd_vol|mysql|nameserver|new_mails|nodename|nodename_short|no_update|nvidia|obsd_product|obsd_sensors_fan|obsd_sensors_temp|obsd_sensors_volt|obsd_vendor|offset|outlinecolor|pb_battery|pid_chroot|pid_cmdline|pid_cwd|pid_environ|pid_environ_list|pid_exe|pid_nice|pid_openfiles|pid_parent|pid_priority|pid_state|pid_state_short|pid_stderr|pid_stdin|pid_stdout|pid_threads|pid_thread_list|pid_time_kernelmode|pid_time_usermode|pid_time|pid_uid|pid_euid|pid_suid|pid_fsuid|pid_gid|pid_egid|pid_sgid|pid_fsgid|pid_read|pid_vmpeak|pid_vmsize|pid_vmlck|pid_vmhwm|pid_vmrss|pid_vmdata|pid_vmstk|pid_vmexe|pid_vmlib|pid_vmpte|pid_write|platform|pop3_unseen|pop3_used|processes|read_tcp|read_udp|replied_mails|rss|running_processes|running_threads|scroll|seen_mails|shadecolor|smapi|smapi_bat_bar|smapi_bat_perc|smapi_bat_power|smapi_bat_temp|sony_fanspeed|stippled_hr|stock|swap|swapbar|swapfree|swapmax|swapperc|sysname|tab|tail|tcp_ping|tcp_portmon|template0|template1|template2|template3|template4|template5|template6|template7|template8|template9|texeci|texecpi|threads|time|to_bytes|top|top_io|top_mem|top_time|totaldown|totalup|trashed_mails|tztime|gid_name|uid_name|unflagged_mails|unforwarded_mails|unreplied_mails|unseen_mails|updates|upspeed|upspeedf|upspeedgraph|uptime|uptime_short|user_names|user_number|user_terms|user_times|user_time|utime|voffset|voltage_mv|voltage_v|weather|wireless_ap|wireless_bitrate|wireless_essid|wireless_link_bar|wireless_link_qual|wireless_link_qual_max|wireless_link_qual_perc|wireless_mode|words|xmms2_album|xmms2_artist|xmms2_bar|xmms2_bitrate|xmms2_comment|xmms2_date|xmms2_duration|xmms2_elapsed|xmms2_genre|xmms2_id|xmms2_percent|xmms2_playlist|xmms2_size|xmms2_smart|xmms2_status|xmms2_timesplayed|xmms2_title|xmms2_tracknr|xmms2_url)\\b"
|
|
14
|
+
|
|
15
|
+
- identifier.var: "\\$\\{?[0-9A-Z_!@#$*?-]+\\}?"
|
|
16
|
+
- symbol.operator: "(\\{|\\}|\\(|\\)|\\;|\\]|\\[|`|\\\\|\\$|<|>|!|=|&|\\|)"
|
|
17
|
+
- constant.macro: "^TEXT$"
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
filetype: c++
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "(\\.c(c|pp|xx)$|\\.h(h|pp|xx)?$|\\.ii?$|\\.(def)$)"
|
|
5
|
+
signature: "\\b(namespace|class|public|protected|private|template|constexpr|noexcept|nullptr|throw)\\b"
|
|
6
|
+
|
|
7
|
+
rules:
|
|
8
|
+
- identifier: "\\b[A-Z_][0-9A-Z_]*\\b"
|
|
9
|
+
- type: "\\b(auto|float|double|bool|char|int|short|long|enum|void|struct|union|typedef|(un)?signed|inline)\\b"
|
|
10
|
+
- type: "\\b(((s?size)|((u_?)?int(8|16|32|64|ptr))|char(8|16|32))_t|wchar_t)\\b"
|
|
11
|
+
- type: "\\b[a-z_][0-9a-z_]+(_t|_T)\\b"
|
|
12
|
+
- type: "\\b(final|override)\\b"
|
|
13
|
+
- statement: "\\b(volatile|const(expr|eval|init)?|mutable|register|thread_local|static|extern|decltype|explicit|virtual)\\b"
|
|
14
|
+
- statement: "\\b(class|namespace|template|typename|this|friend|using|public|protected|private|noexcept)\\b"
|
|
15
|
+
- statement: "\\b(concept|requires)\\b"
|
|
16
|
+
- statement: "\\b(import|export|module)\\b"
|
|
17
|
+
- statement: "\\b(for|if|while|do|else|case|default|switch)\\b"
|
|
18
|
+
- statement: "\\b(try|throw|catch|operator|new|delete|static_assert)\\b"
|
|
19
|
+
- statement: "\\b(goto|continue|break|return)\\b"
|
|
20
|
+
- preproc: "^[[:space:]]*#[[:space:]]*(define|pragma|include|(un|ifn?)def|endif|el(if|se)|if|warning|error)|_Pragma"
|
|
21
|
+
|
|
22
|
+
# Conditionally-supported/extension keywords
|
|
23
|
+
- statement: "\\b(asm|fortran)\\b"
|
|
24
|
+
|
|
25
|
+
# GCC builtins
|
|
26
|
+
- statement: "(__attribute__[[:space:]]*\\(\\([^)]*\\)\\)|__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__)"
|
|
27
|
+
|
|
28
|
+
# Operator Color
|
|
29
|
+
- symbol.operator: "[-+*/%=<>.:;,~&|^!?]|\\b(sizeof|alignof|typeid|(and|or|xor|not)(_eq)?|bitor|compl|bitand|(const|dynamic|reinterpret|static)_cast)\\b"
|
|
30
|
+
# Parenthetical Color
|
|
31
|
+
- symbol.brackets: "[(){}]|\\[|\\]"
|
|
32
|
+
|
|
33
|
+
# Integer Literals
|
|
34
|
+
- constant.number: "(\\b([0-9]|0[0-7]|0[Xx][0-9A-Fa-f]|0[Bb][01])([Uu][Ll]?[Ll]?|[Ll][Ll]?[Uu]?)?\\b)" # Base case (Without ' separtor)
|
|
35
|
+
- constant.number: "(\\b([1-9][0-9']*[0-9])([Uu][Ll]?[Ll]?|[Ll][Ll]?[Uu]?)?\\b)" # Decimal
|
|
36
|
+
- constant.number: "(\\b(0[0-7][0-7']*[0-7])([Uu][Ll]?[Ll]?|[Ll][Ll]?[Uu]?)?\\b)" # Oct
|
|
37
|
+
- constant.number: "(\\b(0[Xx][0-9A-Fa-f][0-9A-Fa-f']*[0-9A-Fa-f])([Uu][Ll]?[Ll]?|[Ll][Ll]?[Uu]?)?\\b)" # Hex
|
|
38
|
+
- constant.number: "(\\b(0[Bb][01][01']*[01])([Uu][Ll]?[Ll]?|[Ll][Ll]?[Uu]?)?\\b)" # Binary
|
|
39
|
+
|
|
40
|
+
# Decimal Floating-point Literals
|
|
41
|
+
- constant.number: "(([0-9]?[.]?\\b[0-9]+)([Ee][+-]?[0-9]+)?[FfLl]?\\b)" # Base case optional interger part with exponent base case
|
|
42
|
+
- constant.number: "(\\b([0-9]+[.][0-9]?)([Ee][+-]?[0-9]+)?[FfLl]?)" # Base case optional fractional part with exponent base case
|
|
43
|
+
- constant.number: "(([0-9]?[.]?\\b[0-9]+)([Ee][+-]?[0-9][0-9']*[0-9])?[FfLl]?\\b)" # Base case optional interger part with exponent
|
|
44
|
+
- constant.number: "(\\b([0-9]+[.][0-9]?)([Ee][+-]?[0-9][0-9']*[0-9])?[FfLl]?)" # Base case optional fractional part with exponent
|
|
45
|
+
|
|
46
|
+
- constant.number: "(([0-9][0-9']*[0-9])?[.]?\\b([0-9][0-9']*[0-9])+([Ee][+-]?[0-9]+)?[FfLl]?\\b)" # Optional interger part with exponent base case
|
|
47
|
+
- constant.number: "(\\b([0-9][0-9']*[0-9])+[.]([0-9][0-9']*[0-9])?([Ee][+-]?[0-9]+)?[FfLl]?)" # Optional fractional part with exponent base case
|
|
48
|
+
- constant.number: "(([0-9][0-9']*[0-9])?[.]?\\b([0-9][0-9']*[0-9])+([Ee][+-]?[0-9][0-9']*[0-9])?[FfLl]?\\b)" # Optional interger part with exponent
|
|
49
|
+
- constant.number: "(\\b([0-9][0-9']*[0-9])+[.]([0-9][0-9']*[0-9])?([Ee][+-]?[0-9][0-9']*[0-9])?[FfLl]?)" # Optional fractional part with exponent
|
|
50
|
+
|
|
51
|
+
# Hexadecimal Floating-point Literals
|
|
52
|
+
- constant.number: "(\\b0[Xx]([0-9a-zA-Z]?[.]?[0-9a-zA-Z]+)([Pp][+-]?[0-9]+)?[FfLl]?\\b)" # Base case optional interger part with exponent base case
|
|
53
|
+
- constant.number: "(\\b0[Xx]([0-9a-zA-Z]+[.][0-9a-zA-Z]?)([Pp][+-]?[0-9]+)?[FfLl]?)" # Base case optional fractional part with exponent base case
|
|
54
|
+
- constant.number: "(\\b0[Xx]([0-9a-zA-Z]?[.]?[0-9a-zA-Z]+)([Pp][+-]?[0-9][0-9']*[0-9])?[FfLl]?\\b)" # Base case optional interger part with exponent
|
|
55
|
+
- constant.number: "(\\b0[Xx]([0-9a-zA-Z]+[.][0-9a-zA-Z]?)([Pp][+-]?[0-9][0-9']*[0-9])?[FfLl]?)" # Base case optional fractional part with exponent
|
|
56
|
+
|
|
57
|
+
- constant.number: "(\\b0[Xx]([0-9a-zA-Z][0-9a-zA-Z']*[0-9a-zA-Z])?[.]?([0-9a-zA-Z][0-9a-zA-Z']*[0-9a-zA-Z])+([Pp][+-]?[0-9]+)?[FfLl]?\\b)" # Optional interger part with exponent base case
|
|
58
|
+
- constant.number: "(\\b0[Xx]([0-9a-zA-Z][0-9a-zA-Z']*[0-9a-zA-Z])+[.]([0-9a-zA-Z][0-9a-zA-Z']*[0-9a-zA-Z])?([Pp][+-]?[0-9]+)?[FfLl]?)" # Optional fractional part with exponent base case
|
|
59
|
+
- constant.number: "(\\b0[Xx]([0-9a-zA-Z][0-9a-zA-Z']*[0-9a-zA-Z])?[.]?([0-9a-zA-Z][0-9a-zA-Z']*[0-9a-zA-Z])+([Pp][+-]?[0-9][0-9']*[0-9])?[FfLl]?\\b)" # Optional interger part with exponent
|
|
60
|
+
- constant.number: "(\\b0[Xx]([0-9a-zA-Z][0-9a-zA-Z']*[0-9a-zA-Z])+[.]([0-9a-zA-Z][0-9a-zA-Z']*[0-9a-zA-Z])?([Pp][+-]?[0-9][0-9']*[0-9])?[FfLl]?)" # Optional fractional part with exponent
|
|
61
|
+
|
|
62
|
+
- constant.bool: "(\\b(true|false|NULL|nullptr|TRUE|FALSE)\\b)"
|
|
63
|
+
|
|
64
|
+
- constant.string:
|
|
65
|
+
start: "\""
|
|
66
|
+
end: "\""
|
|
67
|
+
skip: "\\\\."
|
|
68
|
+
rules:
|
|
69
|
+
- constant.specialChar: "\\\\([\"'abfnrtv\\\\]|[0-3]?[0-7]{1,2}|x[0-9A-Fa-f]{1,2}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})"
|
|
70
|
+
|
|
71
|
+
- constant.string:
|
|
72
|
+
start: "'"
|
|
73
|
+
end: "'"
|
|
74
|
+
skip: "(\\\\.)|\\b([1-9][0-9']+[0-9]|0[0-7']+[0-7]|0[Xx][0-9A-Fa-f][0-9A-Fa-f']+[0-9A-Fa-f]|0[Bb][01][01']*[01])([Uu][Ll]?[Ll]?|[Ll][Ll]?[Uu]?)?\\b"
|
|
75
|
+
rules:
|
|
76
|
+
# TODO: Revert back to - error: "..+" once #3127 is merged
|
|
77
|
+
- error: "[[:graph:]]{2,}'"
|
|
78
|
+
- constant.specialChar: "\\\\([\"'abfnrtv\\\\]|[0-3]?[0-7]{1,2}|x[0-9A-Fa-f]{1,2}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})"
|
|
79
|
+
|
|
80
|
+
- comment:
|
|
81
|
+
start: "//"
|
|
82
|
+
end: "$"
|
|
83
|
+
rules:
|
|
84
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
85
|
+
|
|
86
|
+
- comment:
|
|
87
|
+
start: "/\\*"
|
|
88
|
+
end: "\\*/"
|
|
89
|
+
rules:
|
|
90
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
91
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
filetype: crontab
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "crontab$|/tmp/crontab\\.\\w+$"
|
|
5
|
+
header: "^#.*?/etc/crontab"
|
|
6
|
+
|
|
7
|
+
rules:
|
|
8
|
+
# The time and date fields are:
|
|
9
|
+
# field allowed values
|
|
10
|
+
# ----- --------------
|
|
11
|
+
# minute 0-59
|
|
12
|
+
# hour 0-23
|
|
13
|
+
# day of month 0-31
|
|
14
|
+
# month 0-12 (or names, see below)
|
|
15
|
+
# day of week 0-7 (0 or 7 is Sun, or use names)
|
|
16
|
+
|
|
17
|
+
- statement: "^([\\*0-9,\\-\\/]+)\\s+([\\*0-9,\\-\\/]+)\\s+([\\*0-9,\\-\\/]+)\\s+(([\\*0-9,\\-\\/]+)|(\\b(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\\b))\\s+(([\\*0-9,\\-\\/]+)|(\\b(sun|mon|tue|wed|thu|fri|sat)\\b))\\s+(.*)$\\n?"
|
|
18
|
+
- constant: "^([\\*0-9,\\-\\/]+)\\s+([\\*0-9,\\-\\/]+)\\s+([\\*0-9,\\-\\/]+)\\s+(([\\*0-9,\\-\\/]+)|(\\b(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\\b))\\s+(([\\*0-9,\\-\\/]+)|(\\b(sun|mon|tue|wed|thu|fri|sat)\\b))"
|
|
19
|
+
|
|
20
|
+
# Shell Values
|
|
21
|
+
- type: "^[A-Z]+\\="
|
|
22
|
+
|
|
23
|
+
# Months and weekday keywords
|
|
24
|
+
- constant: "\\b(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\\b"
|
|
25
|
+
- constant: "\\b(sun|mon|tue|wed|thu|fri|sat)\\b"
|
|
26
|
+
- type: "\\@(reboot|yearly|annually|monthly|weekly|daily|midnight|hourly)\\b"
|
|
27
|
+
|
|
28
|
+
# Conditionals
|
|
29
|
+
- special: "(\\{|\\}|\\(|\\)|\\;|\\]|\\[|`|\\\\|\\$|<|>|^|!|=|&|\\|)"
|
|
30
|
+
|
|
31
|
+
- comment:
|
|
32
|
+
start: "#"
|
|
33
|
+
end: "$"
|
|
34
|
+
rules:
|
|
35
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
36
|
+
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
filetype: crystal
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.cr$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
# Asciibetical list of reserved words
|
|
8
|
+
- statement: "\\b(abstract|alias|as|asm|begin|break|case|class|def|do|else|elsif|end|ensure|enum|extend|for|fun|if|in|include|instance_sizeof|lib|loop|macro|module|next|of|out|pointerof|private|protected|raise|require|rescue|return|select|self|sizeof|spawn|struct|super|then|type|typeof|uninitialized|union|unless|until|verbatim|when|while|with|yield)\\b"
|
|
9
|
+
# Constants
|
|
10
|
+
- constant: "\\b(true|false|nil)\\b"
|
|
11
|
+
- constant.number: "\\b[0-9]+\\b"
|
|
12
|
+
# Ones that can't be in the same regex because they include non-words.
|
|
13
|
+
# The nil? one has to be after the constants.
|
|
14
|
+
- statement: "\\b(nil\\?|as(\\?|\\b)|is_a\\?|responds_to\\?)"
|
|
15
|
+
- type: "(\\$|@|@@)?\\b[A-Z]+[0-9A-Z_a-z]*"
|
|
16
|
+
# Crystal "symbols"
|
|
17
|
+
- constant: "([ ]|^):[0-9A-Z_]+\\b"
|
|
18
|
+
# Some unique things we want to stand out
|
|
19
|
+
- constant: "\\b(__FILE__|__LINE__)\\b"
|
|
20
|
+
# Regular expressions
|
|
21
|
+
- constant: "/([^/]|(\\\\/))*/[iomx]*|%r\\{([^}]|(\\\\}))*\\}[iomx]*"
|
|
22
|
+
|
|
23
|
+
# Shell command expansion is in `backticks` or like %x{this}. These are
|
|
24
|
+
# "double-quotish" (to use a perlism).
|
|
25
|
+
- constant.string: "`[^`]*`|%x\\{[^}]*\\}"
|
|
26
|
+
|
|
27
|
+
- constant.string:
|
|
28
|
+
start: "`"
|
|
29
|
+
end: "`"
|
|
30
|
+
rules: []
|
|
31
|
+
|
|
32
|
+
- constant.string:
|
|
33
|
+
start: "%x\\{"
|
|
34
|
+
end: "\\}"
|
|
35
|
+
rules: []
|
|
36
|
+
|
|
37
|
+
- constant.string:
|
|
38
|
+
start: "\""
|
|
39
|
+
end: "\""
|
|
40
|
+
skip: "\\\\."
|
|
41
|
+
rules:
|
|
42
|
+
- constant.specialChar: "\\\\."
|
|
43
|
+
- symbol.brackets:
|
|
44
|
+
start: "#\\{"
|
|
45
|
+
end: "\\}"
|
|
46
|
+
rules:
|
|
47
|
+
- default: ".*"
|
|
48
|
+
|
|
49
|
+
- constant.string:
|
|
50
|
+
start: "'"
|
|
51
|
+
end: "'"
|
|
52
|
+
skip: "\\\\."
|
|
53
|
+
rules:
|
|
54
|
+
- constant.specialChar: "\\\\."
|
|
55
|
+
|
|
56
|
+
- comment:
|
|
57
|
+
start: "#"
|
|
58
|
+
end: "$"
|
|
59
|
+
rules:
|
|
60
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
61
|
+
|
|
62
|
+
- comment.bright:
|
|
63
|
+
start: "##"
|
|
64
|
+
end: "$"
|
|
65
|
+
rules:
|
|
66
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
67
|
+
|
|
68
|
+
- constant:
|
|
69
|
+
start: "<<-?'?EOT'?"
|
|
70
|
+
end: "^EOT"
|
|
71
|
+
rules: []
|
|
72
|
+
|