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,70 @@
|
|
|
1
|
+
filetype: html
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.htm[l]?$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
# Doctype is case-insensitive
|
|
8
|
+
- preproc: "<!(?i)(DOCTYPE html.*)>"
|
|
9
|
+
# Opening tag
|
|
10
|
+
- symbol.tag:
|
|
11
|
+
start: "<(a|abbr|acronym|address|applet|area|article|aside|audio|b|base|bdi|bdo|big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|dialog|dir|div|dl|dt|em|embed|fieldset|figcaption|figure|font|footer|form|frame|frameset|h[1-6]|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|map|main|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|s|samp|section|select|small|source|span|strike|strong|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|track|tt|u|ul|var|video|wbr)\\b"
|
|
12
|
+
end: ">"
|
|
13
|
+
rules:
|
|
14
|
+
- identifier: "\\b(placeholder|style|alt|bgcolor|height|href|id|(aria|data)\\-.+|label|longdesc|name|on(click|focus|load|mouseover)|size|span|src|target|type|value|width|class|charset|content|rel|integrity|crossorigin|for|onsubmit|lang|role)\\b"
|
|
15
|
+
- special: "\\b(required)\\b"
|
|
16
|
+
# Match double-quote strings
|
|
17
|
+
- constant.string:
|
|
18
|
+
start: "\""
|
|
19
|
+
end: "\""
|
|
20
|
+
skip: "\\\\."
|
|
21
|
+
rules:
|
|
22
|
+
- constant.specialChar: "\\\\."
|
|
23
|
+
- constant.string.url: "((ftp(s)?|http(s)?|git|chrome)://[^\\s]+)"
|
|
24
|
+
# Match single-quote strings
|
|
25
|
+
- constant.string:
|
|
26
|
+
start: "'"
|
|
27
|
+
end: "'"
|
|
28
|
+
skip: "\\\\."
|
|
29
|
+
rules:
|
|
30
|
+
- constant.specialChar: "\\\\."
|
|
31
|
+
- constant.string.url: "((ftp(s)?|http(s)?|git|chrome)://[^\\s]+)"
|
|
32
|
+
# Highlight the equals and any colon between words
|
|
33
|
+
- symbol: "\\b(=|:\\b)"
|
|
34
|
+
|
|
35
|
+
# Closing tag
|
|
36
|
+
- symbol.tag:
|
|
37
|
+
start: "</(a|abbr|acronym|address|applet|area|article|aside|audio|b|base|bdi|bdo|big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|dialog|dir|div|dl|dt|em|embed|fieldset|figcaption|figure|font|footer|form|frame|frameset|h[1-6]|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|map|main|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|s|samp|section|select|small|source|span|strike|strong|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|track|tt|u|ul|var|video|wbr)\\b"
|
|
38
|
+
end: ">"
|
|
39
|
+
rules:
|
|
40
|
+
# Anything in the closing tag is an error
|
|
41
|
+
- error: "."
|
|
42
|
+
|
|
43
|
+
# Reserved entities like a and Ī
|
|
44
|
+
- special: "(([a-zA-Z]&#[0-9]+|&[a-zA-Z]+|&#[a-zA-Z0-9]+);)"
|
|
45
|
+
|
|
46
|
+
# TODO: Add `limit-rules` to both the `default` rules below once it's implemented into Micro
|
|
47
|
+
- default:
|
|
48
|
+
start: "<script.*?>"
|
|
49
|
+
end: "</script.*?>"
|
|
50
|
+
limit-group: symbol.tag
|
|
51
|
+
rules:
|
|
52
|
+
- include: "javascript"
|
|
53
|
+
|
|
54
|
+
- default:
|
|
55
|
+
start: "<style.*?>"
|
|
56
|
+
end: "</style.*?>"
|
|
57
|
+
limit-group: symbol.tag
|
|
58
|
+
rules:
|
|
59
|
+
- include: "css"
|
|
60
|
+
|
|
61
|
+
# This weird empty comment thing is technically valid
|
|
62
|
+
- comment: "<!>"
|
|
63
|
+
|
|
64
|
+
- comment.block:
|
|
65
|
+
start: "<!\\-\\-"
|
|
66
|
+
end: "\\-\\->"
|
|
67
|
+
rules:
|
|
68
|
+
- todo: "(FIXME|NOTE|TODO):?"
|
|
69
|
+
# While technically not a "true" error, these are recommended to not be used inside a comment
|
|
70
|
+
- error: "(\\-\\-|>)"
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
filetype: html4
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.htm[l]?4$"
|
|
5
|
+
header: "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN|http://www.w3.org/TR/html4/strict.dtd\">"
|
|
6
|
+
|
|
7
|
+
rules:
|
|
8
|
+
- error: "<[^!].*?>"
|
|
9
|
+
- 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)( .*|>)*?>"
|
|
10
|
+
- symbol.tag.extended: "(?i)<[/]?(body|div|html|head(er)?|footer|title|table|t(body|d|h(ead)?|r|foot))( .*)*?>"
|
|
11
|
+
- preproc: "(?i)<[/]?(script|style)( .*)*?>"
|
|
12
|
+
- special: "&[^;[[:space:]]]*;"
|
|
13
|
+
- symbol: "[:=]"
|
|
14
|
+
- identifier: "(alt|bgcolor|height|href|id|label|longdesc|name|on(click|focus|load|mouseover)|size|span|src|style|target|type|value|width)="
|
|
15
|
+
- constant.string: "\"[^\"]*\""
|
|
16
|
+
- constant.number: "(?i)#[0-9a-fA-F]{6,6}"
|
|
17
|
+
- default:
|
|
18
|
+
start: ">"
|
|
19
|
+
end: "<"
|
|
20
|
+
rules: []
|
|
21
|
+
|
|
22
|
+
- symbol.tag: "<|>"
|
|
23
|
+
- constant.string.url: "(ftp(s)?|http(s)?|git|chrome)://[^ ]+"
|
|
24
|
+
- comment: "<!--.+?-->"
|
|
25
|
+
- preproc: "<!DOCTYPE.+?>"
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
filetype: html5
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.htm[l]?5$"
|
|
5
|
+
header: "<!DOCTYPE html5>"
|
|
6
|
+
|
|
7
|
+
rules:
|
|
8
|
+
- error: "<[^!].*?>"
|
|
9
|
+
- symbol.tag: "(?i)<[/]?(a|a(bbr|ddress|rea|rticle|side|udio)|b|b(ase|d(i|o)|lockquote|r|utton)|ca(nvas|ption)|center|cite|co(de|l|lgroup)|d(ata|atalist|d|el|etails|fn|ialog|l|t)|em|embed|fieldset|fig(caption|ure)|form|iframe|h[1-6]|hr|i|img|in(put|s)|kbd|keygen|label|legend|li|link|ma(in|p|rk)|menu|menuitem|met(a|er)|nav|noscript|o(bject|l|pt(group|ion)|utput)|p|param|picture|pre|progress|q|r(p|t|uby)|s|samp|se(ction|lect)|small|source|span|strong|su(b|p|mmary)|textarea|time|track|u|ul|var|video|wbr)( .*)*?>"
|
|
10
|
+
- symbol.tag.extended: "(?i)<[/]?(body|div|html|head(er)?|footer|title|table|t(body|d|h(ead)?|r|foot))( .*)*?>"
|
|
11
|
+
- preproc: "(?i)<[/]?(script|style)( .*)*?>"
|
|
12
|
+
- special: "&[^;[[:space:]]]*;"
|
|
13
|
+
- symbol: "[:=]"
|
|
14
|
+
- identifier: "(alt|bgcolor|height|href|id|label|longdesc|name|on(click|focus|load|mouseover)|size|span|src|style|target|type|value|width)="
|
|
15
|
+
- constant.string: "\"[^\"]*\""
|
|
16
|
+
- constant.number: "(?i)#[0-9a-fA-F]{6,6}"
|
|
17
|
+
- default:
|
|
18
|
+
start: ">"
|
|
19
|
+
end: "<"
|
|
20
|
+
rules: []
|
|
21
|
+
|
|
22
|
+
- symbol.tag: "<|>"
|
|
23
|
+
- constant.string.url: "(ftp(s)?|http(s)?|git|chrome)://[^ ]+"
|
|
24
|
+
- comment: "<!--.+?-->"
|
|
25
|
+
- preproc: "<!DOCTYPE.+?>"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
filetype: ini
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.(ini|desktop|lfl|override|tscn|tres)$|(mimeapps\\.list|pinforc|setup\\.cfg|project\\.godot)$|weechat/.+\\.conf$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- constant.bool.true: "\\btrue\\b"
|
|
8
|
+
- constant.bool.false: "\\bfalse\\b"
|
|
9
|
+
- identifier: "^[[:space:]]*[^=]*="
|
|
10
|
+
- special: "^[[:space:]]*\\[.*\\]$"
|
|
11
|
+
- statement: "[=;]"
|
|
12
|
+
- constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
|
|
13
|
+
|
|
14
|
+
- comment:
|
|
15
|
+
start: "#"
|
|
16
|
+
end: "$"
|
|
17
|
+
rules:
|
|
18
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
19
|
+
- comment:
|
|
20
|
+
start: ";"
|
|
21
|
+
end: "$"
|
|
22
|
+
rules:
|
|
23
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
filetype: inputrc
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "inputrc$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- constant.bool.false: "\\b(off|none)\\b"
|
|
8
|
+
- constant.bool.true: "\\bon\\b"
|
|
9
|
+
- preproc: "\\bset|\\$include\\b"
|
|
10
|
+
- constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
|
|
11
|
+
- constant.specialChar: "\\\\.?"
|
|
12
|
+
- comment: "(^|[[:space:]])#([^{].*)?$"
|
|
13
|
+
- indent-char.whitespace: "[[:space:]]+$"
|
|
14
|
+
- indent-char: " + +| + +"
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
filetype: java
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.java$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- type: "\\b(boolean|byte|char|double|float|int|long|new|var|short|this|transient|void)\\b"
|
|
8
|
+
- statement: "\\b(break|case|catch|continue|default|do|else|finally|for|if|return|switch|throw|try|while)\\b"
|
|
9
|
+
- type: "\\b(abstract|class|extends|final|implements|import|instanceof|interface|native|package|private|protected|public|static|strictfp|super|synchronized|throws|volatile)\\b"
|
|
10
|
+
- constant: "\\b(true|false|null)\\b"
|
|
11
|
+
- constant.number: "\\b[0-9]+\\b"
|
|
12
|
+
|
|
13
|
+
- constant.string:
|
|
14
|
+
start: "\""
|
|
15
|
+
end: "\""
|
|
16
|
+
skip: "\\\\."
|
|
17
|
+
rules:
|
|
18
|
+
- constant.specialChar: "\\\\."
|
|
19
|
+
|
|
20
|
+
- constant.string:
|
|
21
|
+
start: "'"
|
|
22
|
+
end: "'"
|
|
23
|
+
skip: "\\\\."
|
|
24
|
+
rules:
|
|
25
|
+
- preproc: "..+"
|
|
26
|
+
- constant.specialChar: "\\\\."
|
|
27
|
+
|
|
28
|
+
- comment:
|
|
29
|
+
start: "//"
|
|
30
|
+
end: "$"
|
|
31
|
+
rules: []
|
|
32
|
+
|
|
33
|
+
- comment:
|
|
34
|
+
start: "/\\*"
|
|
35
|
+
end: "\\*/"
|
|
36
|
+
rules: []
|
|
37
|
+
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
filetype: javascript
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "(\\.(m|c)?js$|\\.es[5678]?$)"
|
|
5
|
+
header: "^#!.*/(env +)?(bun|node)( |$)"
|
|
6
|
+
|
|
7
|
+
rules:
|
|
8
|
+
- constant.number: "\\b[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\\b"
|
|
9
|
+
- constant.number: "\\b[-+]?([0-9]+\\.[0-9]*|[0-9]*\\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?"
|
|
10
|
+
- constant.number: "\\b[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?"
|
|
11
|
+
#- identifier: "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]"
|
|
12
|
+
# ^ this is not correct usage of the identifier color
|
|
13
|
+
- symbol.brackets: "[(){}]|\\[|\\]"
|
|
14
|
+
- symbol.operator: "([-+/*=<>!~%?:&|]|[.]{3})"
|
|
15
|
+
- statement: "\\b(async|await|break|case|catch|const|continue|debugger|default)\\b"
|
|
16
|
+
- statement: "\\b(delete|do|else|export|finally|for|function\\*?|class|extends)\\b"
|
|
17
|
+
- statement: "\\b(get|if|import|from|in|of|instanceof|let|new|reject|resolve|return)\\b"
|
|
18
|
+
- statement: "\\b(set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\\b"
|
|
19
|
+
# reserved but unassigned
|
|
20
|
+
- error: "\\b(enum|implements|interface|package|private|protected|public)\\b"
|
|
21
|
+
- constant: "\\b(globalThis|Infinity|null|undefined|NaN)\\b"
|
|
22
|
+
- constant: "\\b(null|undefined|NaN)\\b"
|
|
23
|
+
- constant: "\\b(true|false)\\b"
|
|
24
|
+
- type: "\\b(Array|Boolean|Date|Enumerator|Error|Function|Generator|Map|Math)\\b"
|
|
25
|
+
- type: "\\b(Number|Object|Promise|Proxy|Reflect|RegExp|Set|String|Symbol|WeakMap|WeakSet)\\b"
|
|
26
|
+
- type: "\\b(BigInt64Array|BigUint64Array|Float32Array|Float64Array|Int16Array)\\b"
|
|
27
|
+
|
|
28
|
+
# - constant: "/[^*]([^/]|(\\\\/))*[^\\\\]/[gim]*"
|
|
29
|
+
- constant: "\\\\[0-7][0-7]?[0-7]?|\\\\x[0-9a-fA-F]+|\\\\[bfnrt'\"\\?\\\\]"
|
|
30
|
+
- comment: "^#!.*/(env +)?(bun|node)( |$)"
|
|
31
|
+
|
|
32
|
+
- identifier: "\\b(alert|decodeURI|decodeURIComponent|document|encodeURI|encodeURIComponent|escape|eval|isFinite|isNaN|parseFloat|parseInt|unescape|uneval|window)\\b"
|
|
33
|
+
- identifier: "\\b(Intl|WebAssembly)\\b"
|
|
34
|
+
- identifier: "\\b(Arguments)\\b"
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
- constant.string:
|
|
38
|
+
start: "\""
|
|
39
|
+
end: "\""
|
|
40
|
+
skip: "\\\\."
|
|
41
|
+
rules:
|
|
42
|
+
- constant.specialChar: "\\\\."
|
|
43
|
+
|
|
44
|
+
- constant.string:
|
|
45
|
+
start: "'"
|
|
46
|
+
end: "'"
|
|
47
|
+
skip: "\\\\."
|
|
48
|
+
rules:
|
|
49
|
+
- constant.specialChar: "\\\\."
|
|
50
|
+
|
|
51
|
+
- constant.string:
|
|
52
|
+
start: "`"
|
|
53
|
+
end: "`"
|
|
54
|
+
rules:
|
|
55
|
+
- constant.specialChar: "\\\\."
|
|
56
|
+
- identifier: "\\x24\\{.*?\\}"
|
|
57
|
+
|
|
58
|
+
- constant.bool: "\\b(true|false)\\b"
|
|
59
|
+
- constant.bool.false: "\\b(false)\\b"
|
|
60
|
+
- constant.bool.true: "\\b(true)\\b"
|
|
61
|
+
|
|
62
|
+
- comment:
|
|
63
|
+
start: "//"
|
|
64
|
+
end: "$"
|
|
65
|
+
rules:
|
|
66
|
+
- todo: "(TODO|XXX|FIXME)"
|
|
67
|
+
|
|
68
|
+
- comment:
|
|
69
|
+
start: "/\\*"
|
|
70
|
+
end: "\\*/"
|
|
71
|
+
skip: "\\\\."
|
|
72
|
+
rules:
|
|
73
|
+
- constant.specialChar: "\\\\."
|
|
74
|
+
# function documentation
|
|
75
|
+
- identifier: "\\s\\*\\s.*"
|
|
76
|
+
- todo: "(TODO|XXX|FIXME)"
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
filetype: jinja2
|
|
2
|
+
|
|
3
|
+
rules:
|
|
4
|
+
- include: "html"
|
|
5
|
+
- special: "({{|}}|{%-?|-?%})"
|
|
6
|
+
- default:
|
|
7
|
+
start: "({%-?|{{)"
|
|
8
|
+
end: "(-?%}|}})"
|
|
9
|
+
limit-group: special
|
|
10
|
+
rules:
|
|
11
|
+
- include: "python"
|
|
12
|
+
- statement: "\\b(ignore missing|with(out)? context|block|call|endblock|endcall|endfilter|endfor|endmacro|endraw|endset|extends|filter|for|include|macro|raw|recursive|scoped|set)\\b"
|
|
13
|
+
- identifier.builtinfunc: "\\b(attr|batch|capitalize|center|count|d|default|dictsort|e|escape|filesizeformat|first|forceescape|groupby|indent|join|last|length|lower|pprint|random|reject|rejectattr|replace|reverse|safe|select|selectattr|striptags|title|tojson|trim|truncate|unique|upper|urlencode|urlize|wordcount|wordwrap|xmlattr)\\b"
|
|
14
|
+
- identifier.builtintest: "\\b(callable|defined|divisibleby|eq|equalto|escaped|even|ge|gt|iterable|le|lower|lt|mapping|ne|none|number|odd|sameas|sequence|string|undefined|upper)\\b"
|
|
15
|
+
- identifier.defaultglobal: "\\b(lipsum|cycler|joiner|namespace)\\b"
|
|
16
|
+
- comment:
|
|
17
|
+
start: "{#"
|
|
18
|
+
end: "#}"
|
|
19
|
+
rules: []
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
filetype: json
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.json$"
|
|
5
|
+
header: "^\\{$"
|
|
6
|
+
|
|
7
|
+
rules:
|
|
8
|
+
- constant.number: "\\b[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\\b"
|
|
9
|
+
- constant.number: "\\b[-+]?([0-9]+\\.[0-9]*|[0-9]*\\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?"
|
|
10
|
+
- constant.number: "\\b[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?"
|
|
11
|
+
- constant: "\\b(null)\\b"
|
|
12
|
+
- constant: "\\b(true|false)\\b"
|
|
13
|
+
- constant.string:
|
|
14
|
+
start: "\""
|
|
15
|
+
end: "\""
|
|
16
|
+
skip: "\\\\."
|
|
17
|
+
rules:
|
|
18
|
+
- constant.specialChar: "\\\\."
|
|
19
|
+
- constant.string:
|
|
20
|
+
start: "'"
|
|
21
|
+
end: "'"
|
|
22
|
+
skip: "\\\\."
|
|
23
|
+
rules:
|
|
24
|
+
- constant.specialChar: "\\\\."
|
|
25
|
+
|
|
26
|
+
- statement: "\\\"(\\\\\"|[^\"])*\\\"[[:space:]]*:\" \"'(\\'|[^'])*'[[:space:]]*:"
|
|
27
|
+
- constant: "\\\\u[0-9a-fA-F]{4}|\\\\[bfnrt'\"/\\\\]"
|
|
28
|
+
|
|
29
|
+
- comment:
|
|
30
|
+
start: "//"
|
|
31
|
+
end: "$"
|
|
32
|
+
rules:
|
|
33
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
34
|
+
|
|
35
|
+
- comment:
|
|
36
|
+
start: "/\\*"
|
|
37
|
+
end: "\\*/"
|
|
38
|
+
rules:
|
|
39
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
filetype: jsonnet
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.jsonnet$"
|
|
5
|
+
|
|
6
|
+
# Spec: https://jsonnet.org/ref/spec.html
|
|
7
|
+
|
|
8
|
+
rules:
|
|
9
|
+
# built-in objects
|
|
10
|
+
# FIXME: $ won't match
|
|
11
|
+
- constant: "\\b(self|\\$|super)\\b"
|
|
12
|
+
# boolean constants
|
|
13
|
+
- constant.bool: "\\b(null|true|false)\\b"
|
|
14
|
+
# the standard library
|
|
15
|
+
- identifier: "\\bstd\\.(extVar|thisFile|type|length|objectHas|objectFields|objectHasAll|objectFieldsAll|prune|mapWithKey|abs|sign|max|min|pow|exp|log|exponent|mantissa|floor|ceil|sqrt|sin|cos|tan|asin|acos|atan|mod|assertEqual|toString|codepoint|char|substr|findSubstr|startsWith|endsWith|split|splitLimit|strReplace|asciiUpper|asciiLower|stringChars|format|escapeStringDollars|escapeStringPython|parseInt|parseOctal|parseHex|parseJson|encodeUTF8|decodeUTF8|manifestIni|manifestPython|manifestPythonVars|manifestJsonEx|manifestYamlDoc|manifestYamlStream|manifestXmlJsonml|makeArray|count|find|map|mapWithIndex|filterMap|filter|foldl|foldr|range|join|lines|flattenArrays|sort|uniq|set|setInter|setUnion|setDiff|setMember|base64|base64DecodeBytes|base64Decode|md5|mergePatch|trace)\\b"
|
|
16
|
+
# unquoted object keys
|
|
17
|
+
- type: "[_a-zA-Z][_a-zA-Z0-9]*\\s*:"
|
|
18
|
+
# object key separator
|
|
19
|
+
- statement: ":"
|
|
20
|
+
# keywords
|
|
21
|
+
- statement: "\\b(assert|else|error|for|function|if|import|importstr|in|local|tailstrict|then)\\b"
|
|
22
|
+
# operators
|
|
23
|
+
- symbol.operator: "([.;,+*|=!\\%]|<|>|/|-|&)"
|
|
24
|
+
# parentheses
|
|
25
|
+
- symbol.brackets: "([(){}]|\\[|\\])"
|
|
26
|
+
# numbers
|
|
27
|
+
- constant.number: "\\b(0|([1-9][0-9]*))(\\.[0-9]+)?([eE][\\+-]?[0-9]+)?\\b"
|
|
28
|
+
|
|
29
|
+
# double-quoted string
|
|
30
|
+
- constant.string:
|
|
31
|
+
start: "\""
|
|
32
|
+
end: "\""
|
|
33
|
+
skip: "\\\\\""
|
|
34
|
+
rules:
|
|
35
|
+
- constant.specialChar: "\\\\u[0-9a-fA-F]{4}|\\\\[bfnrt'\"/\\\\]"
|
|
36
|
+
|
|
37
|
+
# single-quoted string
|
|
38
|
+
- constant.string:
|
|
39
|
+
start: "'"
|
|
40
|
+
end: "'"
|
|
41
|
+
skip: "\\\\'"
|
|
42
|
+
rules:
|
|
43
|
+
- constant.specialChar: "\\\\u[0-9a-fA-F]{4}|\\\\[bfnrt'\"/\\\\]"
|
|
44
|
+
|
|
45
|
+
# double-quoted verbatim string
|
|
46
|
+
- constant.string:
|
|
47
|
+
start: "@\""
|
|
48
|
+
end: "\""
|
|
49
|
+
skip: "\\\\\""
|
|
50
|
+
rules:
|
|
51
|
+
- constant.specialChar: "\\\\\""
|
|
52
|
+
|
|
53
|
+
# single-quoted verbatim string
|
|
54
|
+
- constant.string:
|
|
55
|
+
start: "@'"
|
|
56
|
+
end: "'"
|
|
57
|
+
skip: "\\\\'"
|
|
58
|
+
rules:
|
|
59
|
+
- constant.specialChar: "\\\\'"
|
|
60
|
+
|
|
61
|
+
# block string
|
|
62
|
+
- constant.string:
|
|
63
|
+
# FIXME:
|
|
64
|
+
# This isn't quite right.
|
|
65
|
+
# The spec says this:
|
|
66
|
+
|
|
67
|
+
# beginning with |||, followed by optional whitespace and a new-line.
|
|
68
|
+
# The next non-blank line must be prefixed with some non-zero length
|
|
69
|
+
# whitespace W. The block ends at the first subsequent line that does
|
|
70
|
+
# not begin with W, and it is an error if this line does not contain
|
|
71
|
+
# some optional whitespace followed by |||.
|
|
72
|
+
|
|
73
|
+
# We need to match ^(\s+) on the first non-blank line after |||
|
|
74
|
+
# Then we need to skip ^\1.*$
|
|
75
|
+
|
|
76
|
+
start: "\\|\\|\\| *$"
|
|
77
|
+
end: "^ *\\|\\|\\|"
|
|
78
|
+
rules: []
|
|
79
|
+
|
|
80
|
+
# multi-line comment
|
|
81
|
+
- comment:
|
|
82
|
+
start: "/\\*"
|
|
83
|
+
end: "\\*/"
|
|
84
|
+
rules:
|
|
85
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
86
|
+
|
|
87
|
+
# single-line comment
|
|
88
|
+
- comment:
|
|
89
|
+
start: "#|(//)"
|
|
90
|
+
end: "$"
|
|
91
|
+
rules:
|
|
92
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
filetype: julia
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.jl$"
|
|
5
|
+
header: "^#!.*/(env +)?julia( |$)"
|
|
6
|
+
|
|
7
|
+
rules:
|
|
8
|
+
|
|
9
|
+
# built-in objects
|
|
10
|
+
- constant.bool: "\\b(true|false)\\b"
|
|
11
|
+
- constant: "\\b(nothing|missing)\\b"
|
|
12
|
+
# built-in attributes
|
|
13
|
+
- constant: "__[A-Za-z0-9_]+__"
|
|
14
|
+
# definitions
|
|
15
|
+
- identifier: "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]"
|
|
16
|
+
# keywords
|
|
17
|
+
- statement: "\\b(baremodule|begin|break|catch|const|continue|do|else|elseif|end|export|finally|for|function|global|if|import|let|local|macro|module|public|quote|return|struct|try|using|while)\\b"
|
|
18
|
+
- statement: "\\b(abstract\\s+type|primitive\\s+type|mutable\\s+struct)\\b"
|
|
19
|
+
# decorators
|
|
20
|
+
- identifier.macro: "@[A-Za-z0-9_]+"
|
|
21
|
+
# operators
|
|
22
|
+
- symbol.operator: "[:+*|=!%~<>/\\-?&\\\\÷∈∉∘]|\\b(in|isa|where)\\b"
|
|
23
|
+
# for some reason having ^ in the same regex with the other operators broke things
|
|
24
|
+
- symbol.operator: "\\^"
|
|
25
|
+
# parentheses
|
|
26
|
+
- symbol.brackets: "([(){}]|\\[|\\])"
|
|
27
|
+
# numbers
|
|
28
|
+
- constant.number: "\\b([0-9]+(_[0-9]+)*|0x[0-9a-fA-F]+(_[0-9a-fA-F]+)*|0b[01]+(_[01]+)*|0o[0-7]+(_[0-7]+)*|Inf(16|32|64)?|NaN(16|32|64)?)\\b"
|
|
29
|
+
|
|
30
|
+
- constant.string:
|
|
31
|
+
start: "\"\"\""
|
|
32
|
+
end: "\"\"\""
|
|
33
|
+
rules: []
|
|
34
|
+
|
|
35
|
+
- constant.string:
|
|
36
|
+
start: "\""
|
|
37
|
+
end: "\""
|
|
38
|
+
skip: "\\\\."
|
|
39
|
+
rules:
|
|
40
|
+
- constant.specialChar: "\\\\([\"'abfnrtv\\\\]|[0-3]?[0-7]{1,2}|x[0-9A-Fa-f]{1,2}|u[0-9A-Fa-f]{1,4}|U[0-9A-Fa-f]{1,8})"
|
|
41
|
+
|
|
42
|
+
# Lifted from Rust's syntax highlighting
|
|
43
|
+
- constant.string: "'(\\\\.|.)'"
|
|
44
|
+
- constant.string:
|
|
45
|
+
start: "'\""
|
|
46
|
+
end: "'"
|
|
47
|
+
rules: []
|
|
48
|
+
|
|
49
|
+
- comment:
|
|
50
|
+
start: "#="
|
|
51
|
+
end: "=#"
|
|
52
|
+
rules: []
|
|
53
|
+
|
|
54
|
+
- comment:
|
|
55
|
+
start: "#"
|
|
56
|
+
end: "$"
|
|
57
|
+
rules: []
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# For more information, see https://github.com/casey/just
|
|
2
|
+
filetype: 'justfile'
|
|
3
|
+
|
|
4
|
+
detect:
|
|
5
|
+
filename: "(^\\.?[Jj]ustfile|\\.just)$"
|
|
6
|
+
header: "^#!.*/(env +)?[bg]?just --justfile"
|
|
7
|
+
|
|
8
|
+
rules:
|
|
9
|
+
- preproc: "\\<(ifeq|ifdef|ifneq|ifndef|else|endif)\\>"
|
|
10
|
+
- statement: "^(export|include|override)\\>"
|
|
11
|
+
- symbol.operator: "^[^:= ]+:"
|
|
12
|
+
- symbol.operator: "([=,%]|\\+=|\\?=|:=|&&|\\|\\|)"
|
|
13
|
+
- statement: "\\$\\((abspath|addprefix|addsuffix|and|basename|call|dir)[[:space:]]"
|
|
14
|
+
- statement: "\\$\\((error|eval|filter|filter-out|findstring|firstword)[[:space:]]"
|
|
15
|
+
- statement: "\\$\\((flavor|foreach|if|info|join|lastword|notdir|or)[[:space:]]"
|
|
16
|
+
- statement: "\\$\\((origin|patsubst|realpath|shell|sort|strip|suffix)[[:space:]]"
|
|
17
|
+
- statement: "\\$\\((value|warning|wildcard|word|wordlist|words)[[:space:]]"
|
|
18
|
+
# default functions - probably shouldn't be overwritten by assignment
|
|
19
|
+
- statement: "\\b(arch|os|os_family|env_var|invocation_directory|justfile|justfile_directory|just_executable|lowercase|quote|replace|trim|trim_end|trim_end|trim_end_match|trim_end_matches|trim_start|trim_start_match|trim_start_matches|uppercase)\\b"
|
|
20
|
+
- identifier: "^.+:"
|
|
21
|
+
- identifier: "[()$]"
|
|
22
|
+
- constant.string:
|
|
23
|
+
start: "\""
|
|
24
|
+
end: "\""
|
|
25
|
+
skip: "\\\\."
|
|
26
|
+
rules:
|
|
27
|
+
- constant.specialChar: "\\\\."
|
|
28
|
+
- constant.string:
|
|
29
|
+
start: "'"
|
|
30
|
+
end: "'"
|
|
31
|
+
skip: "\\\\."
|
|
32
|
+
rules:
|
|
33
|
+
- constant.specialChar: "\\\\."
|
|
34
|
+
- identifier: "\\$+(\\{[^} ]+\\}|\\([^) ]+\\))"
|
|
35
|
+
- identifier: "\\$[@^<*?%|+]|\\$\\([@^<*?%+-][DF]\\)"
|
|
36
|
+
- identifier: "\\$\\$|\\\\.?"
|
|
37
|
+
- comment:
|
|
38
|
+
start: "#"
|
|
39
|
+
end: "$"
|
|
40
|
+
rules: []
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
filetype: keymap
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.(k|key)?map$|Xmodmap$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- statement: "\\b(add|clear|compose|keycode|keymaps|keysym|remove|string)\\b"
|
|
8
|
+
- statement: "\\b(control|alt|shift)\\b"
|
|
9
|
+
- constant.number: "\\b[0-9]+\\b"
|
|
10
|
+
- special: "="
|
|
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
|
+
- comment:
|
|
24
|
+
start: "^!"
|
|
25
|
+
end: "$"
|
|
26
|
+
rules: []
|
|
27
|
+
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
filetype: kickstart
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.ks$|\\.kickstart$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- special: "%[a-z]+"
|
|
8
|
+
- statement: "^[[:space:]]*(install|cdrom|text|graphical|volgroup|logvol|reboot|timezone|lang|keyboard|authconfig|firstboot|rootpw|user|firewall|selinux|repo|part|partition|clearpart|bootloader)"
|
|
9
|
+
- constant: "--(name|mirrorlist|baseurl|utc)(=|\\>)"
|
|
10
|
+
- statement: "\\$(releasever|basearch)\\>"
|
|
11
|
+
- brightblack: "^@[A-Za-z][A-Za-z-]*"
|
|
12
|
+
- brightred: "^-@[a-zA-Z0-9*-]+"
|
|
13
|
+
- red: "^-[a-zA-Z0-9*-]+"
|
|
14
|
+
- comment: "(^|[[:space:]])#([^{].*)?$"
|
|
15
|
+
- indent-char.whitespace: "[[:space:]]+$"
|
|
16
|
+
- indent-char: " + +| + +"
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
filetype: kotlin
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.kts?$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
|
|
8
|
+
# Operators
|
|
9
|
+
- symbol.operator: ([.:;,+*|=!?\\%]|<|>|/|-|&)
|
|
10
|
+
|
|
11
|
+
# Statements Keywords
|
|
12
|
+
- statement: \b(as|by|class|constructor|companion|const|fun|import|in|infix|interface|inline|is|out|operator|package|return|suspend|super|this|when|val|var)\b
|
|
13
|
+
- statement.properties: \b(get|set)\b
|
|
14
|
+
- statement.control: \b(break|continue|else|do|if|try|catch|finally|for|while)\b
|
|
15
|
+
- statement.class: \b(abstract|annotation|data|enum|final|open|sealed)\b
|
|
16
|
+
- statement.member: \b(override|lateinit|init)\b
|
|
17
|
+
- statement.access: \b(internal|private|protected|public)\b
|
|
18
|
+
- statement.parameter: \b(crossinline|noinline|reified|vararg)\b
|
|
19
|
+
|
|
20
|
+
# Expression and types
|
|
21
|
+
- type: \b(dynamic|object|throw|typealias)\b
|
|
22
|
+
|
|
23
|
+
# Meta
|
|
24
|
+
- statement.meta: \@(\bfile|delegate|field|get|property|receiver|set|setparam|param|)\b
|
|
25
|
+
|
|
26
|
+
# Constant
|
|
27
|
+
- constant: \b(true|false|null)
|
|
28
|
+
- constant.number: ([0-9]+)
|
|
29
|
+
|
|
30
|
+
# Storage Types
|
|
31
|
+
- type.storage: \b(Byte|UByte|Char|Double|Float|Int|UInt|Long|ULong|Short|UShort|Boolean|Unit|Nothing)\b
|
|
32
|
+
|
|
33
|
+
# Collections
|
|
34
|
+
- type.collections: \b(Array)\b
|
|
35
|
+
|
|
36
|
+
# String
|
|
37
|
+
- constant.string:
|
|
38
|
+
start: \"
|
|
39
|
+
end: \"
|
|
40
|
+
skip: \\.
|
|
41
|
+
rules:
|
|
42
|
+
- constant.specialChar: (\\0|\\\\|\\t|\\n|\\r|\\"|\\')
|
|
43
|
+
- constant.unicode: \\u\{[[:xdigit:]]+}
|
|
44
|
+
|
|
45
|
+
# Shebang Line
|
|
46
|
+
- comment.shebang: ^(#!).*
|
|
47
|
+
|
|
48
|
+
# Line Comment
|
|
49
|
+
- comment.line: "//.*"
|
|
50
|
+
|
|
51
|
+
# Block Comment
|
|
52
|
+
- comment.block:
|
|
53
|
+
start: "/\\*"
|
|
54
|
+
end: "\\*/"
|
|
55
|
+
rules:
|
|
56
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
57
|
+
|
|
58
|
+
# Doc Block Comment
|
|
59
|
+
- comment.block:
|
|
60
|
+
start: "/\\*\\*"
|
|
61
|
+
end: "\\*/"
|
|
62
|
+
rules:
|
|
63
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
64
|
+
|
|
65
|
+
# Todo
|
|
66
|
+
- todo: "(TODO|XXX|FIXME):?"
|