bunmicro 0.8.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/LICENSE +22 -0
- package/PORTING.md +34 -0
- package/README.md +153 -0
- package/bmi +5 -0
- package/bun.lock +17 -0
- package/bunmicro +5 -0
- package/hlw.md +5 -0
- package/package.json +18 -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/colors.md +421 -0
- package/runtime/help/commands.md +161 -0
- package/runtime/help/copypaste.md +149 -0
- package/runtime/help/defaultkeys.md +141 -0
- package/runtime/help/help.md +63 -0
- package/runtime/help/keybindings.md +760 -0
- package/runtime/help/linter.md +90 -0
- package/runtime/help/options.md +701 -0
- package/runtime/help/plugins.md +544 -0
- package/runtime/help/tutorial.md +112 -0
- package/runtime/jsplugins/chapter/chapter.js +108 -0
- package/runtime/jsplugins/diff/diff.js +46 -0
- package/runtime/jsplugins/example/example.js +108 -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 +76 -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 +62 -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/src/buffer/buffer.js +126 -0
- package/src/buffer/loc.js +38 -0
- package/src/buffer/message.js +29 -0
- package/src/config/colorscheme.js +109 -0
- package/src/config/config.js +118 -0
- package/src/config/defaults.js +102 -0
- package/src/display/ansi-style.js +60 -0
- package/src/highlight/highlighter.js +237 -0
- package/src/highlight/parser.js +137 -0
- package/src/index.js +5942 -0
- package/src/lua/engine.js +38 -0
- package/src/platform/archive.js +50 -0
- package/src/platform/clipboard.js +160 -0
- package/src/platform/commands.js +140 -0
- package/src/plugins/js-bridge.js +902 -0
- package/src/plugins/manager.js +619 -0
- package/src/runtime/registry.js +89 -0
- package/src/screen/cell-buffer.js +81 -0
- package/src/screen/events.js +263 -0
- package/src/screen/screen.js +118 -0
- package/src/screen/vt100.js +391 -0
- package/src/shell/shell.js +70 -0
- package/todo.txt +359 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
filetype: dockerfile
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "((Docker|Container)file[^/]*$|\\.(docker|container)file$)"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
## Keywords
|
|
8
|
+
- type.keyword: "(?i)^(FROM|MAINTAINER|RUN|CMD|LABEL|EXPOSE|ENV|ADD|COPY|ENTRYPOINT|VOLUME|USER|WORKDIR|ONBUILD|ARG|HEALTHCHECK|STOPSIGNAL|SHELL)[[:space:]]"
|
|
9
|
+
|
|
10
|
+
## Brackets & parenthesis
|
|
11
|
+
- statement: "(\\(|\\)|\\[|\\])"
|
|
12
|
+
|
|
13
|
+
## Double ampersand
|
|
14
|
+
- special: "&&"
|
|
15
|
+
|
|
16
|
+
## Comments
|
|
17
|
+
- comment:
|
|
18
|
+
start: "#"
|
|
19
|
+
end: "$"
|
|
20
|
+
rules:
|
|
21
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
22
|
+
|
|
23
|
+
- constant.string:
|
|
24
|
+
start: "\""
|
|
25
|
+
end: "\""
|
|
26
|
+
skip: "\\\\."
|
|
27
|
+
rules:
|
|
28
|
+
- constant.specialChar: "\\\\."
|
|
29
|
+
|
|
30
|
+
- constant.string:
|
|
31
|
+
start: "'"
|
|
32
|
+
end: "'"
|
|
33
|
+
skip: "\\\\."
|
|
34
|
+
rules:
|
|
35
|
+
- constant.specialChar: "\\\\."
|
|
36
|
+
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
filetype: dot
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.(dot|gv)$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- type: "\\b(digraph|edge|graph|node|subgraph)\\b"
|
|
8
|
+
- statement: "\\b(arrow(head|size|tail)|(bg|fill|font)?color|center|constraint|decorateP|dir|distortion|font(name|size)|head(clip|label)|height|label(angle|distance|font(color|name|size))?|layer(s)?|margin|mclimit|minlen|name|nodesep|nslimit|ordering|orientation|page(dir)?|peripheries|port_label_distance|rank(dir|sep)?|ratio|regular|rotate|same(head|tail)|shape(file)?|sides|size|skew|style|tail(clip|label)|URL|weight|width)\\b"
|
|
9
|
+
- symbol: "=|->|--"
|
|
10
|
+
|
|
11
|
+
- constant.string:
|
|
12
|
+
start: "\""
|
|
13
|
+
end: "\""
|
|
14
|
+
skip: "\\\\."
|
|
15
|
+
rules:
|
|
16
|
+
- constant.specialChar: "\\\\."
|
|
17
|
+
|
|
18
|
+
- comment:
|
|
19
|
+
start: "//"
|
|
20
|
+
end: "$"
|
|
21
|
+
rules:
|
|
22
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
23
|
+
|
|
24
|
+
- comment:
|
|
25
|
+
start: "/\\*"
|
|
26
|
+
end: "\\*/"
|
|
27
|
+
rules:
|
|
28
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
29
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
filetype: elixir
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.ex$|\\.exs$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- statement: "\\b(abs|trunc|rem|div|round|max|min|and|or|not|throw|raise|reraise|hd|tl|in|length|elem|put_elem|destructure|to_(string|charlist)|is_(atom|binary|bitstring|boolean|float|function|integer|list|map|nil|number|pid|port|reference|tuple)|(bit|byte|map|tuple)_size|binary_part|def(delegate|exception|guard|guardp|impl|macro|macrop|module|overridable|p|protocol|struct)?|sigil_[crswCRSWDNT]|if|else|unless|cond|binding|node|self|spawn|spawn_link|spawn_monitor|send|exit|struct|get_and_update_in|get_in|put_in|pop_in|update_in|apply|inspect|make_ref|use|do|end)\\b"
|
|
8
|
+
- statement: "\\b(alias|import|require|case|fn|receive|after|try|catch|rescue|super|quote|unquote|unquote_splicing|for|with)\\b"
|
|
9
|
+
|
|
10
|
+
- constant: "\\b\\[A-Z]+\\b"
|
|
11
|
+
- constant.number: "\\b[0-9]+\\b"
|
|
12
|
+
|
|
13
|
+
- constant.string: "`[^`]*`|%x\\{[^}]*\\}"
|
|
14
|
+
- constant.string: "\"([^\"]|(\\\\\"))*\"|%[QW]?\\{[^}]*\\}|%[QW]?\\([^)]*\\)|%[QW]?<[^>]*>|%[QW]?\\[[^]]*\\]|%[QW]?\\$[^$]*\\$|%[QW]?\\^[^^]*\\^|%[QW]?![^!]*!"
|
|
15
|
+
- constant.string: "'([^']|(\\\\'))*'|%[qw]\\{[^}]*\\}|%[qw]\\([^)]*\\)|%[qw]<[^>]*>|%[qw]\\[[^]]*\\]|%[qw]\\$[^$]*\\$|%[qw]\\^[^^]*\\^|%[qw]![^!]*!"
|
|
16
|
+
|
|
17
|
+
- symbol.brackets: "\\{|\\}|\\[|\\]|\\(|\\)"
|
|
18
|
+
|
|
19
|
+
- comment: "#[^{].*$|#$"
|
|
20
|
+
- comment.bright: "##[^{].*$|##$"
|
|
21
|
+
|
|
22
|
+
- type.keyword: "\\:[a-zA-Z][a-zA-Z0-9_]*"
|
|
23
|
+
- type.keyword: "\\b(describe|test)"
|
|
24
|
+
- statement: "\\b(expected|assert|assert_raise|assert_in_delta|assert_received|catch_error|catch_throw|flunk|refute|refute_in_delta|refute_received)\\b"
|
|
25
|
+
- symbol.tag: "^\\s*\\@[a-zA-Z][a-zA-Z0-9_]*\\b"
|
|
26
|
+
|
|
27
|
+
- identifier.macro: "\\b(__CALLER__|__DIR__|__ENV__|__MODULE__|__aliases__|__block__|defmacro)\\b"
|
|
28
|
+
|
|
29
|
+
- todo: "(XXX|TODO|FIXME|\\?\\?\\?)"
|
|
30
|
+
- preproc.shebang: "\\W*#!.+?( |$)"
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
filetype: elm
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.elm$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- statement: "\\b(as|alias|case|else|exposing|if|import|in|let|module|of|port|then|type|)\\b"
|
|
8
|
+
- statement: "(\\=|\\:|\\->)"
|
|
9
|
+
- type: "\\b([A-Z][A-Za-z\\d]*)\\b"
|
|
10
|
+
- identifier: "^([a-z][A-Za-z\\d]*)\\b"
|
|
11
|
+
- constant.string:
|
|
12
|
+
start: "\"\"\""
|
|
13
|
+
end: "\"\"\""
|
|
14
|
+
skip: "\\\\."
|
|
15
|
+
rules:
|
|
16
|
+
- constant.specialChar: "\\\\."
|
|
17
|
+
- constant.string:
|
|
18
|
+
start: "\""
|
|
19
|
+
end: "\""
|
|
20
|
+
skip: "\\\\."
|
|
21
|
+
rules:
|
|
22
|
+
- constant.specialChar: "\\\\."
|
|
23
|
+
- constant.string:
|
|
24
|
+
start: "'"
|
|
25
|
+
end: "'"
|
|
26
|
+
skip: "\\\\."
|
|
27
|
+
rules:
|
|
28
|
+
- constant.specialChar: "\\\\."
|
|
29
|
+
- comment:
|
|
30
|
+
start: "--"
|
|
31
|
+
end: "$"
|
|
32
|
+
rules:
|
|
33
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
34
|
+
- comment:
|
|
35
|
+
start: "\\{-"
|
|
36
|
+
end: "-\\}"
|
|
37
|
+
rules:
|
|
38
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
filetype: erb
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.erb$|\\.rhtml$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- error: "<[^!].*?>"
|
|
8
|
+
- symbol.tag: "(?i)<[/]?(a(bbr|cronym|ddress|pplet|rea|rticle|side|udio)?|b(ase(font)?|d(i|o)|ig|lockquote|r)?|ca(nvas|ption)|center|cite|co(de|l|lgroup)|d(ata(list)?|d|el|etails|fn|ialog|ir|l|t)|em(bed)?|fieldset|fig(caption|ure)|font|form|(i)?frame|frameset|h[1-6]|hr|i|img|in(put|s)|kbd|keygen|label|legend|li(nk)?|ma(in|p|rk)|menu(item)?|met(a|er)|nav|no(frames|script)|o(l|pt(group|ion)|utput)|p(aram|icture|re|rogress)?|q|r(p|t|uby)|s(trike)?|samp|se(ction|lect)|small|source|span|strong|su(b|p|mmary)|textarea|time|track|u(l)?|var|video|wbr)( .*|>)*?>"
|
|
9
|
+
- symbol.tag.extended: "(?i)<[/]?(body|div|html|head(er)?|footer|title|table|t(body|d|h(ead)?|r|foot))( .*|>)*?>"
|
|
10
|
+
- preproc: "(?i)<[/]?(script|style)( .*|>)*?>"
|
|
11
|
+
- special: "&[^;[[:space:]]]*;"
|
|
12
|
+
- symbol: "[:=]"
|
|
13
|
+
- identifier: "(alt|bgcolor|height|href|id|label|longdesc|name|onclick|onfocus|onload|onmouseover|size|span|src|style|target|type|value|width)="
|
|
14
|
+
- constant.string: "\"[^\"]*\""
|
|
15
|
+
- constant.number: "(?i)#[0-9a-fA-F]{6,6}"
|
|
16
|
+
- constant.string.url: "(ftp(s)?|http(s)?|git|chrome)://[^ ]+"
|
|
17
|
+
- comment: "<!--.+?-->"
|
|
18
|
+
- preproc: "<!DOCTYPE.+?>"
|
|
19
|
+
- default:
|
|
20
|
+
start: "<%"
|
|
21
|
+
end: "%>"
|
|
22
|
+
rules: []
|
|
23
|
+
|
|
24
|
+
- preproc: "<%|%>"
|
|
25
|
+
- red: "&[^;[[:space:]]]*;"
|
|
26
|
+
- statement: "\\b(BEGIN|END|alias|and|begin|break|case|class|def|defined\\?|do|else|elsif|end|ensure|false|for|if|in|module|next|nil|not|or|redo|rescue|retry|return|self|super|then|true|undef|unless|until|when|while|yield)\\b"
|
|
27
|
+
- identifier.var: "(\\$|@|@@)?\\b[A-Z]+[0-9A-Z_a-z]*"
|
|
28
|
+
- magenta: "(?i)([ ]|^):[0-9A-Z_]+\\b"
|
|
29
|
+
- identifier.macro: "\\b(__FILE__|__LINE__)\\b"
|
|
30
|
+
- brightmagenta: "!/([^/]|(\\\\/))*/[iomx]*|%r\\{([^}]|(\\\\}))*\\}[iomx]*"
|
|
31
|
+
- brightblue: "`[^`]*`|%x\\{[^}]*\\}"
|
|
32
|
+
- constant.string: "\"([^\"]|(\\\\\"))*\"|%[QW]?\\{[^}]*\\}|%[QW]?\\([^)]*\\)|%[QW]?<[^>]*>|%[QW]?\\[[^]]*\\]|%[QW]?\\$[^$]*\\$|%[QW]?\\^[^^]*\\^|%[QW]?![^!]*!"
|
|
33
|
+
- brightgreen: "#\\{[^}]*\\}"
|
|
34
|
+
- green: "'([^']|(\\\\'))*'|%[qw]\\{[^}]*\\}|%[qw]\\([^)]*\\)|%[qw]<[^>]*>|%[qw]\\[[^]]*\\]|%[qw]\\$[^$]*\\$|%[qw]\\^[^^]*\\^|%[qw]![^!]*!"
|
|
35
|
+
- comment: "#[^{].*$|#$"
|
|
36
|
+
- comment.bright: "##[^{].*$|##$"
|
|
37
|
+
- identifier.macro:
|
|
38
|
+
start: "<<-?'?EOT'?"
|
|
39
|
+
end: "^EOT"
|
|
40
|
+
rules: []
|
|
41
|
+
|
|
42
|
+
- todo: "(XXX|TODO|FIXME|\\?\\?\\?)"
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
filetype: erlang
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.erl$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- identifier: "\\b[A-Z][0-9a-z_]*\\b"
|
|
8
|
+
# See: https://erlang.org/doc/reference_manual/data_types.html
|
|
9
|
+
- constant.number: "\\b[0-9]+(\\.[0-9]+)?(e-?[0-9]+)?\\b"
|
|
10
|
+
- constant.number: "\\b[0-9]{1,2}\\#[a-zA-Z0-9]+\\b"
|
|
11
|
+
- constant.bool: "\\b(true|false)\\b"
|
|
12
|
+
- constant.number: "\\$\\\\?\\S{1}"
|
|
13
|
+
# See: https://erlang.org/doc/reference_manual/introduction.html
|
|
14
|
+
- statement: "\\b(after|and|andalso|band|begin|bnot|bor|bsl|bsr|bxor|case|catch|cond|div|end|fun|if|let|not|of|or|orelse|receive|rem|try|when|xor)\\b"
|
|
15
|
+
# See: https://erlang.org/doc/reference_manual/macros.html
|
|
16
|
+
- preproc: "\\-(module|export|record|include|include_lib|define|undef|ifdef|ifndef|else|endif|if|elif|error|warning)\\b"
|
|
17
|
+
- identifier.macro: "\\?[A-Z0-9_]+\\b"
|
|
18
|
+
# See: https://erlang.org/doc/man/erlang.html
|
|
19
|
+
- special: "\\b(ext_binary|binary|iovec|message_queue_data|time(_unit|stamp)|abs|apply|atom(_to_binary|_to_list)|binary_(part|to_atom|to_existing_atom|to_float|to_integer|to_list|to_term)|bit(_size|string_to_list)|byte_size|ceil|check_(old_code|process_code)|date|delete_module|demonitor|disconnect_node|element|erase|error|exit|float(_to_binary|_to_list)?|floor|garbage_collect|get|group_leader|halt|integer(_to_binary|to_list)|iolist_(size|to_binary)|is_(alive|atom|binary|bitstring|boolean|float|function|integer|list|map|map_key|number|pid|port|process_alive|record|reference|tuple|length)|link|list_to_(atom|binary|bitstring|existing_atom|float|integer|pid|port|ref|tuple)|load_module|make_ref|map_(get|size)|max|min|module_loaded|monitor(_node)?|nodes?|now|open_port|pid_to_list|port(_close|command|connect|control|to_list)|pre_loaded|process(_flag|_info|es)|purge_module|put|register(ed)?|round|self|setelement|size|spawn(_link|_monitor|_opt|_binary)?|statistics|trunc|tuple_(size|to_list)|unlink|unregister|whereis)\\b"
|
|
20
|
+
# See: https://erlang.org/doc/reference_manual/data_types.html#atom
|
|
21
|
+
- symbol:
|
|
22
|
+
start: "'"
|
|
23
|
+
end: "'"
|
|
24
|
+
skip: "\\\\."
|
|
25
|
+
rules: []
|
|
26
|
+
# - constant.specialChar: "%."
|
|
27
|
+
# - constant.specialChar: "\\\\[abfnrtv'\\\"\\\\]"
|
|
28
|
+
# - constant.specialChar: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})"
|
|
29
|
+
- constant.string:
|
|
30
|
+
start: "\""
|
|
31
|
+
end: "\""
|
|
32
|
+
skip: "\\\\."
|
|
33
|
+
rules:
|
|
34
|
+
- constant.specialChar: "%."
|
|
35
|
+
- constant.specialChar: "\\\\[abfnrtv'\\\"\\\\]"
|
|
36
|
+
- constant.specialChar: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})"
|
|
37
|
+
- comment:
|
|
38
|
+
start: "\\(\\*"
|
|
39
|
+
end: "\\*\\)"
|
|
40
|
+
rules:
|
|
41
|
+
- todo: "(TODO|FIXME|WONTFIX|NOTE|HACK):?"
|
|
42
|
+
- comment:
|
|
43
|
+
start: "%"
|
|
44
|
+
end: "$"
|
|
45
|
+
rules: []
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
filetype: fish
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.fish$"
|
|
5
|
+
header: "^#!.*/(env +)?fish( |$)"
|
|
6
|
+
|
|
7
|
+
rules:
|
|
8
|
+
# Numbers
|
|
9
|
+
- constant: "\\b[0-9]+\\b"
|
|
10
|
+
|
|
11
|
+
# Conditionals and control flow
|
|
12
|
+
- statement: "\\b(and|begin|break|case|continue|else|end|for|function|if|in|not|or|return|select|shift|switch|while)\\b"
|
|
13
|
+
- special: "(\\{|\\}|\\(|\\)|\\;|\\]|\\[|`|\\\\|\\$|<|>|^|!|=|&|\\|)"
|
|
14
|
+
|
|
15
|
+
# Fish commands
|
|
16
|
+
- type: "\\b(bg|bind|block|breakpoint|builtin|cd|count|command|commandline|complete|dirh|dirs|echo|emit|eval|exec|exit|fg|fish|fish_config|fish_ident|fish_pager|fish_prompt|fish_right_prompt|fish_update_completions|fishd|funced|funcsave|functions|help|history|jobs|math|mimedb|nextd|open|popd|prevd|psub|pushd|pwd|random|read|set|set_color|source|status|string|trap|type|ulimit|umask|vared)\\b"
|
|
17
|
+
|
|
18
|
+
# Common linux commands
|
|
19
|
+
- type: "\\b((g|ig)?awk|bash|dash|find|\\w{0,4}grep|kill|killall|\\w{0,4}less|make|pkill|sed|sh|tar)\\b"
|
|
20
|
+
|
|
21
|
+
# Coreutils commands
|
|
22
|
+
- type: "\\b(base64|basename|cat|chcon|chgrp|chmod|chown|chroot|cksum|comm|cp|csplit|cut|date|dd|df|dir|dircolors|dirname|du|env|expand|expr|factor|false|fmt|fold|head|hostid|id|install|join|link|ln|logname|ls|md5sum|mkdir|mkfifo|mknod|mktemp|mv|nice|nl|nohup|nproc|numfmt|od|paste|pathchk|pinky|pr|printenv|printf|ptx|pwd|readlink|realpath|rm|rmdir|runcon|seq|(sha1|sha224|sha256|sha384|sha512)sum|shred|shuf|sleep|sort|split|stat|stdbuf|stty|sum|sync|tac|tail|tee|test|time|timeout|touch|tr|true|truncate|tsort|tty|uname|unexpand|uniq|unlink|users|vdir|wc|who|whoami|yes)\\b"
|
|
23
|
+
|
|
24
|
+
# Conditional flags
|
|
25
|
+
- statement: "--[a-z-]+"
|
|
26
|
+
- statement: "\\ -[a-z]+"
|
|
27
|
+
|
|
28
|
+
- identifier: "(?i)\\{?\\$[0-9A-Z_!@#$*?-]+\\}?"
|
|
29
|
+
|
|
30
|
+
- constant.string:
|
|
31
|
+
start: "\""
|
|
32
|
+
end: "\""
|
|
33
|
+
skip: "\\\\."
|
|
34
|
+
rules:
|
|
35
|
+
- constant.specialChar: "\\\\."
|
|
36
|
+
|
|
37
|
+
- constant.string:
|
|
38
|
+
start: "'"
|
|
39
|
+
end: "'"
|
|
40
|
+
skip: "\\\\."
|
|
41
|
+
rules: []
|
|
42
|
+
|
|
43
|
+
- comment:
|
|
44
|
+
start: "#"
|
|
45
|
+
end: "$"
|
|
46
|
+
rules:
|
|
47
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
48
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
filetype: forth
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.(forth|4th|fs|fs8|ft|fth|frt)$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- identifier: "\\b[A-Za-z_0-9-]*\\b"
|
|
8
|
+
|
|
9
|
+
- statement: "\\b(?i:(if|else|then|do|loop|case|endcase|of|endof|begin|while|repeat|until|again|unloop|leave|exit|done|next|\\?do|\\+do|\\-do|\\+loop|\\-loop|\\?leave))\\b"
|
|
10
|
+
|
|
11
|
+
- statement: "(^:|;$)"
|
|
12
|
+
|
|
13
|
+
- type: "\\b(?i:(variable|constant|cells))\\b"
|
|
14
|
+
|
|
15
|
+
- special: "\\B[?.]\\B" #for some reason, \b and \B are inverted for symbols
|
|
16
|
+
|
|
17
|
+
- constant.number: "\\b[0-9]+\\b"
|
|
18
|
+
|
|
19
|
+
- constant.string:
|
|
20
|
+
start: "\\b([Ss.]\" )"
|
|
21
|
+
end: "\""
|
|
22
|
+
rules: []
|
|
23
|
+
|
|
24
|
+
- comment:
|
|
25
|
+
start: "\\("
|
|
26
|
+
end: "\\)"
|
|
27
|
+
rules:
|
|
28
|
+
- todo: "(TODO|NOTE|XXX|FIXME):?"
|
|
29
|
+
|
|
30
|
+
- comment:
|
|
31
|
+
start: "\\\\"
|
|
32
|
+
end: "$"
|
|
33
|
+
rules:
|
|
34
|
+
- todo: "(TODO|NOTE|XXX|FIXME):?"
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
filetype: fortran
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.([Ff]|[Ff]90|[Ff]95|[Ff][Oo][Rr])$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- type: "(?i)\\b(action|advance|all|allocatable|allocated|any|apostrophe)\\b"
|
|
8
|
+
- type: "(?i)\\b(append|asis|assign|assignment|associated|bind|character|common)\\b"
|
|
9
|
+
- type: "(?i)\\b(complex|data|default|delim|dimension|double precision)\\b"
|
|
10
|
+
- type: "(?i)\\b(elemental|enum|enumerator|epsilon|external|file|fmt|form|format|huge)\\b"
|
|
11
|
+
- type: "(?i)\\b(implicit|include|index|inquire|integer|intent|interface)\\b"
|
|
12
|
+
- type: "(?i)\\b(intrinsic|iostat|kind|logical|module|none|null|only)\\\\b"
|
|
13
|
+
- type: "(?i)\\b(operator|optional|pack|parameter|pointer|position|private)\\b"
|
|
14
|
+
- type: "(?i)\\b(program|public|real|recl|recursive|selected_int_kind)\\b"
|
|
15
|
+
- type: "(?i)\\b(selected_real_kind|subroutine|status|module|function|logical)\\b"
|
|
16
|
+
|
|
17
|
+
- constant: "(?i)\\b(abs|achar|adjustl|adjustr|allocate|bit_size|call|char)\\b"
|
|
18
|
+
- constant: "(?i)\\b(close|contains|count|cpu_time|cshift|date_and_time)\\b"
|
|
19
|
+
- constant: "(?i)\\b(deallocate|digits|dot_product|eor|eoshift|iachar)\\b"
|
|
20
|
+
- constant: "(?i)\\b(iand|ibclr|ibits|ibset|ichar|ieor|iolength|ior|ishft|ishftc)\\b"
|
|
21
|
+
- constant: "(?i)\\b(lbound|len|len_trim|matmul|maxexponent|maxloc|maxval|merge)\\b"
|
|
22
|
+
- constant: "(?i)\\b(minexponent|minloc|minval|mvbits|namelist|nearest|nullify)\\b"
|
|
23
|
+
- constant: "(?i)\\b(open|pad|present|print|product|pure|quote|radix)\\b"
|
|
24
|
+
- constant: "(?i)\\b(random_number|random_seed|range|read|readwrite|replace)\\b"
|
|
25
|
+
- constant: "(?i)\\b(reshape|rewind|save|scan|sequence|shape|sign|size|spacing)\\b"
|
|
26
|
+
- constant: "(?i)\\b(spread|sum|system_clock|target|transfer|transpose|trim)\\b"
|
|
27
|
+
- constant: "(?i)\\b(ubound|unpack|verify|write|tiny|type|use|yes|true|false|not)\\b"
|
|
28
|
+
|
|
29
|
+
- constant.number: "\\b([0-9]+)\\b"
|
|
30
|
+
|
|
31
|
+
- statement: "(?i)\\b(.and.|case|do|else|else?if|else?where|end|end?do|end?if)\\b"
|
|
32
|
+
- statement: "(?i)\\b(end?select|.eqv.|forall|if|lge|lgt|lle|llt|.neqv.|.not.)\\b"
|
|
33
|
+
- statement: "(?i)\\b(or|and|repeat|select|case|then|where|while|import)\\b"
|
|
34
|
+
|
|
35
|
+
- special: "(?i)\\b(continue|cycle|exit|go?to|result|return)\\b"
|
|
36
|
+
|
|
37
|
+
#Operator Color
|
|
38
|
+
- symbol.operator: "[.:;,+*|=!\\%]|/|-|>|<|&"
|
|
39
|
+
|
|
40
|
+
#Parenthetical Color
|
|
41
|
+
- symbol.bracket: "[(){}]|\\[|\\]"
|
|
42
|
+
|
|
43
|
+
# Add preprocessor commands.
|
|
44
|
+
- preproc: "^[[:space:]]*#[[:space:]]*(define|include|(un|ifn?)def|endif|el(if|se)|if|warning|error)"
|
|
45
|
+
|
|
46
|
+
- constant.string:
|
|
47
|
+
start: "\""
|
|
48
|
+
end: "\""
|
|
49
|
+
skip: "\\\\."
|
|
50
|
+
rules:
|
|
51
|
+
- constant.specialChar: "\\\\."
|
|
52
|
+
|
|
53
|
+
- constant.string:
|
|
54
|
+
start: "'"
|
|
55
|
+
end: "'"
|
|
56
|
+
skip: "\\\\."
|
|
57
|
+
rules:
|
|
58
|
+
- constant.specialChar: "\\\\."
|
|
59
|
+
|
|
60
|
+
- comment:
|
|
61
|
+
start: "!"
|
|
62
|
+
end: "$"
|
|
63
|
+
rules:
|
|
64
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
filetype: fsharp
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.fs?$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- identifier: "\\b[A-Z][0-9a-z_]{2,}\\b"
|
|
8
|
+
#declarations
|
|
9
|
+
- statement: "\\b(let|val|method|in|and|rec|private|virtual|constraint)\\b"
|
|
10
|
+
#structure items
|
|
11
|
+
- type: "\\b(type|open|class|module|exception|external)\\b"
|
|
12
|
+
#patterns
|
|
13
|
+
- statement: "\\b(fun|function|functor|match|try|with)\\b"
|
|
14
|
+
#patterns-modifiers
|
|
15
|
+
- statement: "\\b(as|when|of)\\b"
|
|
16
|
+
#conditions
|
|
17
|
+
- statement: "\\b(if|then|else)\\b"
|
|
18
|
+
#blocs
|
|
19
|
+
- type: "\\b(begin|end|object|struct|sig|for|while|do|done|to|downto)\\b"
|
|
20
|
+
#constantes
|
|
21
|
+
- constant.bool: "\\b(true|false)\\b"
|
|
22
|
+
#modules/classes
|
|
23
|
+
- special: "\\b(include|inherit|initializer)\\b"
|
|
24
|
+
#expr modifiers
|
|
25
|
+
- special: "\\b(new|ref|mutable|lazy|assert|raise)\\b"
|
|
26
|
+
#keywords which don't exist in ocaml
|
|
27
|
+
- type: "\\b(base|delegate|downcast|extern|finally|fixed|global|inline|interface|internal|let!|member|namespace|null|override|private|public)\\b"
|
|
28
|
+
- type: "\\b(return|return!|select|static|upcast|use|use!|void|yield|yield!)\\b"
|
|
29
|
+
- constant.string:
|
|
30
|
+
start: "'"
|
|
31
|
+
end: "'"
|
|
32
|
+
skip: "\\\\."
|
|
33
|
+
rules:
|
|
34
|
+
- constant.specialChar: "%."
|
|
35
|
+
- constant.specialChar: "\\\\[abfnrtv'\\\"\\\\]"
|
|
36
|
+
- constant.specialChar: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})"
|
|
37
|
+
- constant.string:
|
|
38
|
+
start: "\""
|
|
39
|
+
end: "\""
|
|
40
|
+
skip: "\\\\."
|
|
41
|
+
rules:
|
|
42
|
+
- constant.specialChar: "%."
|
|
43
|
+
- constant.specialChar: "\\\\[abfnrtv'\\\"\\\\]"
|
|
44
|
+
- constant.specialChar: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})"
|
|
45
|
+
- comment:
|
|
46
|
+
start: "\\(\\*"
|
|
47
|
+
end: "\\*\\)"
|
|
48
|
+
rules: []
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
filetype: gdscript
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.gd$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
# Built-in constants
|
|
8
|
+
- constant: "\\b(INF|NAN|PI|TAU)\\b"
|
|
9
|
+
- constant.bool: "\\b(null|true|false)\\b"
|
|
10
|
+
# Built-in functions
|
|
11
|
+
- identifier: "\\b(abs|acos|asin|atan|atan2|ceil|clamp|convert|cos|cosh|db2linear|decimals|deg2rad|ease|exp|float|floor|fmod|fposmod|hash|int|isinf|isnan|lerp|linear2db|load|log|max|min|nearest_po2|pow|preload|print|printerr|printraw|prints|printt|rad2deg|rand_range|rand_seed|randomize|randi|randf|range|round|seed|sin|slerp|sqrt|str|str2var|tan|typeof|var2str|weakref)\\b"
|
|
12
|
+
# Built-in node names
|
|
13
|
+
- identifier: "\\b(AnimationPlayer|AnimationTreePlayer|Button|Control|Engine|HTTPClient|HTTPRequest|Input|InputEvent|MainLoop|Node|Node2D|OS|SceneTree|Spatial|StreamPeer|PacketPeer|PacketPeerUDP|Timer|Tween)\\b"
|
|
14
|
+
# Types
|
|
15
|
+
- type: "\\b(AABB|Array|Basis|Color|Dictionary|NodePath|Object|Plane|PoolByteArray|PoolColorArray|PoolIntArray|PoolRealArray|PoolVector2Array|PoolVector3Array|Quat|Rect2|RID|String|Transform|Transform2D|Vector2|Vector3)\\b"
|
|
16
|
+
# Definitions
|
|
17
|
+
- identifier: "func [a-zA-Z_0-9]+"
|
|
18
|
+
# Keywords
|
|
19
|
+
- statement: "\\b(and|as|assert|break|breakpoint|class|const|continue|elif|else|enum|export|extends|for|func|if|in|is|map|master|mastersync|match|not|onready|or|pass|remote|remotesync|return|self|setget|slave|slavesync|signal|sync|tool|var|while|yield)\\b"
|
|
20
|
+
|
|
21
|
+
# Operators
|
|
22
|
+
- statement: "[.:;,+*|=!\\%@]|<|>|/|-|&"
|
|
23
|
+
|
|
24
|
+
# Parentheses
|
|
25
|
+
- statement: "[(){}]|\\[|\\]"
|
|
26
|
+
|
|
27
|
+
# Numbers
|
|
28
|
+
- constant: "\\b[0-9]+\\b"
|
|
29
|
+
- constant.number: "\\b([0-9]+|0x[0-9a-fA-F]*)\\b|'.'"
|
|
30
|
+
|
|
31
|
+
- comment:
|
|
32
|
+
start: "\"\"\""
|
|
33
|
+
end: "\"\"\""
|
|
34
|
+
rules:
|
|
35
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
36
|
+
|
|
37
|
+
- comment:
|
|
38
|
+
start: "'''"
|
|
39
|
+
end: "'''"
|
|
40
|
+
rules:
|
|
41
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
42
|
+
|
|
43
|
+
- constant.string:
|
|
44
|
+
start: "\""
|
|
45
|
+
end: "\""
|
|
46
|
+
skip: "\\\\."
|
|
47
|
+
rules:
|
|
48
|
+
- constant.specialChar: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})"
|
|
49
|
+
|
|
50
|
+
- constant.string:
|
|
51
|
+
start: "'"
|
|
52
|
+
end: "'"
|
|
53
|
+
skip: "\\\\."
|
|
54
|
+
rules:
|
|
55
|
+
- constant.specialChar: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})"
|
|
56
|
+
|
|
57
|
+
- comment:
|
|
58
|
+
start: "#"
|
|
59
|
+
end: "$"
|
|
60
|
+
rules:
|
|
61
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
filetype: gemini
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.(gmi|gemini)$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
# link lines
|
|
8
|
+
- constant: "^=>[[:space:]].*"
|
|
9
|
+
# preformatted text lines
|
|
10
|
+
- special:
|
|
11
|
+
start: "^```"
|
|
12
|
+
end: "^```"
|
|
13
|
+
rules: []
|
|
14
|
+
# heading lines
|
|
15
|
+
- special: "^#{1,3}.*"
|
|
16
|
+
# unordered list items
|
|
17
|
+
- identifier: "^\\*[[:space:]]"
|
|
18
|
+
# quote lines
|
|
19
|
+
- statement: "^>.*"
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
filetype: ebuild
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.e(build|class)$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
# All the standard portage functions
|
|
8
|
+
- identifier: "^src_(unpack|compile|install|test)|^pkg_(config|nofetch|setup|(pre|post)(inst|rm))"
|
|
9
|
+
# Highlight bash related syntax
|
|
10
|
+
- statement: "\\b(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while|continue|break)\\b"
|
|
11
|
+
- statement: "(\\{|\\}|\\(|\\)|\\;|\\]|\\[|`|\\\\|\\$|<|>|!|=|&|\\|)"
|
|
12
|
+
- statement: "-(e|d|f|r|g|u|w|x|L)\\b"
|
|
13
|
+
- statement: "-(eq|ne|gt|lt|ge|le|s|n|z)\\b"
|
|
14
|
+
# Highlight variables ... official portage ones in red, all others in bright red
|
|
15
|
+
- preproc: "\\$\\{?[a-zA-Z_0-9]+\\}?"
|
|
16
|
+
- special: "\\b(ARCH|HOMEPAGE|DESCRIPTION|IUSE|SRC_URI|LICENSE|SLOT|KEYWORDS|FILESDIR|WORKDIR|(P|R)?DEPEND|PROVIDE|DISTDIR|RESTRICT|USERLAND)\\b"
|
|
17
|
+
- special: "\\b(S|D|T|PV|PF|P|PN|A)\\b|\\bC(XX)?FLAGS\\b|\\bLDFLAGS\\b|\\bC(HOST|TARGET|BUILD)\\b"
|
|
18
|
+
# Highlight portage commands
|
|
19
|
+
- identifier: "\\buse(_(with|enable))?\\b [!a-zA-Z0-9_+ -]*|inherit.*"
|
|
20
|
+
- statement: "\\be(begin|end|conf|install|make|warn|infon?|error|log|patch|new(group|user))\\b"
|
|
21
|
+
- statement: "\\bdie\\b|\\buse(_(with|enable))?\\b|\\binherit\\b|\\bhas\\b|\\b(has|best)_version\\b|\\bunpack\\b"
|
|
22
|
+
- statement: "\\b(do|new)(ins|s?bin|doc|lib(\\.so|\\.a)|man|info|exe|initd|confd|envd|pam|menu|icon)\\b"
|
|
23
|
+
- statement: "\\bdo(python|sed|dir|hard|sym|html|jar|mo)\\b|\\bkeepdir\\b"
|
|
24
|
+
- statement: "prepall(docs|info|man|strip)|prep(info|lib|lib\\.(so|a)|man|strip)"
|
|
25
|
+
- statement: "\\b(doc|ins|exe)into\\b|\\bf(owners|perms)\\b|\\b(exe|ins|dir)opts\\b"
|
|
26
|
+
# Highlight common commands used in ebuilds
|
|
27
|
+
- type: "\\bmake\\b|\\b(cat|cd|chmod|chown|cp|echo|env|export|grep|let|ln|mkdir|mv|rm|sed|set|tar|touch|unset)\\b"
|
|
28
|
+
|
|
29
|
+
- constant.string:
|
|
30
|
+
start: "\""
|
|
31
|
+
end: "\""
|
|
32
|
+
skip: "\\\\."
|
|
33
|
+
rules:
|
|
34
|
+
- constant.specialChar: "\\\\."
|
|
35
|
+
|
|
36
|
+
- constant.string:
|
|
37
|
+
start: "'"
|
|
38
|
+
end: "'"
|
|
39
|
+
skip: "\\\\."
|
|
40
|
+
rules:
|
|
41
|
+
- constant.specialChar: "\\\\."
|
|
42
|
+
|
|
43
|
+
- comment:
|
|
44
|
+
start: "#"
|
|
45
|
+
end: "$"
|
|
46
|
+
rules:
|
|
47
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
48
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
filetype: etc-portage
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.(keywords|mask|unmask|use)(/.+)?$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
# Use flags:
|
|
8
|
+
- constant.bool.false: "[[:space:]]+\\+?[a-zA-Z0-9_-]+"
|
|
9
|
+
- constant.bool.true: "[[:space:]]+-[a-zA-Z0-9_-]+"
|
|
10
|
+
# Likely version numbers:
|
|
11
|
+
- special: "-[[:digit:]].*([[:space:]]|$)"
|
|
12
|
+
# Accepted arches:
|
|
13
|
+
- identifier.class: "[~-]?\\b(alpha|amd64|arm|hppa|ia64|mips|ppc|ppc64|s390|sh|sparc|x86|x86-fbsd)\\b"
|
|
14
|
+
- identifier.class: "[[:space:]][~-]?\\*"
|
|
15
|
+
# Categories:
|
|
16
|
+
- statement: "^[[:space:]]*.*/"
|
|
17
|
+
# Masking regulators:
|
|
18
|
+
- symbol: "^[[:space:]]*(=|~|<|<=|=<|>|>=|=>)"
|
|
19
|
+
# Comments:
|
|
20
|
+
- comment:
|
|
21
|
+
start: "#"
|
|
22
|
+
end: "$"
|
|
23
|
+
rules: []
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
filetype: git-commit
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: '^(.*[\\/])?(COMMIT_EDITMSG|TAG_EDITMSG|MERGE_MSG)$'
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
# File changes
|
|
8
|
+
- type.keyword: "#[[:space:]](deleted|modified|new file|renamed):[[:space:]].*"
|
|
9
|
+
- type.keyword: "#[[:space:]]deleted:"
|
|
10
|
+
- type.keyword: "#[[:space:]]modified:"
|
|
11
|
+
- type.keyword: "#[[:space:]]new file:"
|
|
12
|
+
- type.keyword: "#[[:space:]]renamed:"
|
|
13
|
+
- type.keyword: "^#[[:space:]]Changes.*[:]"
|
|
14
|
+
- type.keyword: "^#[[:space:]]Your branch and '[^']+"
|
|
15
|
+
- type.keyword: "^#[[:space:]]Your branch and '"
|
|
16
|
+
- type.keyword: "^#[[:space:]]On branch [^ ]+"
|
|
17
|
+
- type.keyword: "^#[[:space:]]On branch"
|
|
18
|
+
# Color keywords for closing issues (such as on Github)
|
|
19
|
+
- type.keyword: "\\b(?i)((fix(es|ed)?|close(s|d)?) #[0-9]+)\\b"
|
|
20
|
+
|
|
21
|
+
# Comments
|
|
22
|
+
- comment.line:
|
|
23
|
+
start: "^#"
|
|
24
|
+
end: "$"
|
|
25
|
+
rules: []
|
|
26
|
+
|
|
27
|
+
# Diffs (i.e. git commit --verbose)
|
|
28
|
+
- default:
|
|
29
|
+
start: "^diff --git"
|
|
30
|
+
# Diff output puts a space before file contents on each line so this
|
|
31
|
+
# should never match valid diff output and extend highlighting to the
|
|
32
|
+
# end of the file
|
|
33
|
+
end: "^ENDOFFILE"
|
|
34
|
+
rules:
|
|
35
|
+
- include: "patch"
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
filetype: git-config
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: 'git(config|modules)$|^(.*[\\/])?\.?git[\\/]config$'
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- constant: "\\<(true|false)\\>"
|
|
8
|
+
- type.keyword: "^[[:space:]]*[^=]*="
|
|
9
|
+
- constant: "^[[:space:]]*\\[.*\\]$"
|
|
10
|
+
- constant: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
|
|
11
|
+
- comment:
|
|
12
|
+
start: "#"
|
|
13
|
+
end: "$"
|
|
14
|
+
rules: []
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
filetype: git-rebase-todo
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: '^(.*[\\/])?git\-rebase\-todo$'
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
# Rebase commands
|
|
8
|
+
- statement: "^(p(ick)?|r(eword)?|e(dit)?|s(quash)?|f(ixup)?|x|exec|b(reak)?|d(rop)?|l(abel)?|t|reset|m(erge)?)\\b"
|
|
9
|
+
# Commit IDs
|
|
10
|
+
- identifier: "\\b([0-9a-fA-F]{7,40})\\b"
|
|
11
|
+
|
|
12
|
+
# Color keywords for Github (and others)
|
|
13
|
+
- type.keyword: "\\b(?i)((fix(es|ed)?|close(s|d)?) #[0-9]+)\\b"
|
|
14
|
+
|
|
15
|
+
# Comments
|
|
16
|
+
- comment.line:
|
|
17
|
+
start: "^#"
|
|
18
|
+
end: "$"
|
|
19
|
+
rules: []
|