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,52 @@
|
|
|
1
|
+
filetype: csharp
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.cs$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
# Class
|
|
8
|
+
- identifier.class: "class +[A-Za-z0-9]+ *((:) +[A-Za-z0-9.]+)?"
|
|
9
|
+
|
|
10
|
+
# Annotation
|
|
11
|
+
- identifier.var: "@[A-Za-z]+"
|
|
12
|
+
|
|
13
|
+
- preproc: "^[[:space:]]*#[[:space:]]*(define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)"
|
|
14
|
+
- identifier: "([A-Za-z0-9_]*[[:space:]]*[()])"
|
|
15
|
+
- type: "\\b(bool|byte|sbyte|char|decimal|double|float|IntPtr|int|uint|long|ulong|managed|unmanaged|nint|nuint|object|short|ushort|string|base|this|var|void)\\b"
|
|
16
|
+
- statement: "\\b(alias|as|case|catch|checked|default|do|dynamic|else|finally|fixed|for|foreach|goto|if|is|lock|new|null|return|switch|throw|try|unchecked|when|while|with)\\b"
|
|
17
|
+
- statement: "\\b(abstract|add|and|args|async|await|class|const|delegate|enum|event|explicit|extern|file|get|global|implicit|in|init|internal|interface|nameof|namespace|not|notnull|operator|or|out|override|params|partial|private|protected|public|readonly|record|ref|remove|required|scoped|sealed|set|sizeof|stackalloc|static|struct|typeof|unsafe|using|value|virtual|volatile|yield)\\b"
|
|
18
|
+
# LINQ-only keywords (ones that cannot be used outside of a LINQ query - lots others can)
|
|
19
|
+
- statement: "\\b(from|where|select|group|info|orderby|join|let|in|on|equals|by|ascending|descending)\\b"
|
|
20
|
+
- special: "\\b(break|continue)\\b"
|
|
21
|
+
- constant.bool: "\\b(true|false)\\b"
|
|
22
|
+
- symbol.operator: "[\\-+/*=<>?:!~%&|]"
|
|
23
|
+
- constant.number: "\\b([0-9._]+|0x[A-Fa-f0-9_]+|0b[0-1_]+)[FL]?\\b"
|
|
24
|
+
|
|
25
|
+
- constant.string:
|
|
26
|
+
start: "\""
|
|
27
|
+
end: "\""
|
|
28
|
+
skip: "\\\\."
|
|
29
|
+
rules:
|
|
30
|
+
- constant.specialChar: "\\\\([btnfr]|'|\\\"|\\\\)"
|
|
31
|
+
- constant.specialChar: "\\\\u[A-Fa-f0-9]{4}"
|
|
32
|
+
|
|
33
|
+
- constant.string:
|
|
34
|
+
start: "'"
|
|
35
|
+
end: "'"
|
|
36
|
+
skip: "\\\\."
|
|
37
|
+
rules:
|
|
38
|
+
- constant.specialChar: "\\\\([btnfr]|'|\\\"|\\\\)"
|
|
39
|
+
- constant.specialChar: "\\\\u[A-Fa-f0-9]{4}"
|
|
40
|
+
|
|
41
|
+
- comment:
|
|
42
|
+
start: "//"
|
|
43
|
+
end: "$"
|
|
44
|
+
rules:
|
|
45
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
46
|
+
|
|
47
|
+
- comment:
|
|
48
|
+
start: "/\\*"
|
|
49
|
+
end: "\\*/"
|
|
50
|
+
rules:
|
|
51
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
52
|
+
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
filetype: css
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.(css|scss)$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
# Classes and IDs
|
|
8
|
+
- statement: "(?i)."
|
|
9
|
+
# - normal:
|
|
10
|
+
# start: "\\{"
|
|
11
|
+
# end: "\\}"
|
|
12
|
+
# rules: []
|
|
13
|
+
# css commands
|
|
14
|
+
- type: "(align-content|align-items|alignment-baseline|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|appearance|azimuth|backdrop-filter|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|baseline-shift|bookmark-label|bookmark-level|bookmark-state|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-boundary|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-decoration-break|box-shadow|box-sizing|box-snap|box-suppress|break-after|break-before|break-inside|caption-side|caret|caret-animation|caret-color|caret-shape|chains|clear|clip|clip-path|clip-rule|color|color-interpolation-filters|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|columns|column-span|column-width|content|continue|counter-increment|counter-reset|counter-set|cue|cue-after|cue-before|cursor|direction|display|dominant-baseline|elevation|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|float-defer|float-offset|float-reference|flood-color|flood-opacity|flow|flow-from|flow-into|font|font-family|font-feature-settings|font-kerning|font-language-override|font-size|font-size-adjust|font-stretch|font-style|font-synthesis|font-variant|font-variant-alternates|font-variant-caps|font-variant-east-asian|font-variant-ligatures|font-variant-numeric|font-variant-position|font-weight|footnote-display|footnote-policy|gap|glyph-orientation-vertical|grid|grid-area|grid-auto-columns|grid-auto-flow|grid-auto-rows|grid-column|grid-column-end|grid-column-gap|grid-column-start|grid-gap|grid-row|grid-row-end|grid-row-gap|grid-row-start|grid-template|grid-template-areas|grid-template-columns|grid-template-rows|hanging-punctuation|height|hyphenate-character|hyphenate-limit-chars|hyphenate-limit-last|hyphenate-limit-lines|hyphenate-limit-zone|hyphens|image-orientation|image-rendering|image-resolution|initial-letter|initial-letter-align|initial-letter-wrap|isolation|justify-content|justify-items|justify-self|left|letter-spacing|lighting-color|line-break|line-grid|line-height|line-snap|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|marker|marker-end|marker-knockout-left|marker-knockout-right|marker-mid|marker-pattern|marker-segment|marker-side|marker-start|marquee-direction|marquee-loop|marquee-speed|marquee-style|mask|mask-border|mask-border-mode|mask-border-outset|mask-border-repeat|mask-border-slice|mask-border-source|mask-border-width|mask-clip|mask-composite|mask-image|mask-mode|mask-origin|mask-position|mask-repeat|mask-size|mask-type|max-height|max-lines|max-width|min-height|min-width|mix-blend-mode|motion|motion-offset|motion-path|motion-rotation|nav-down|nav-left|nav-right|nav-up|object-fit|object-position|offset-after|offset-before|offset-end|offset-start|opacity|order|orphans|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-style|overflow-wrap|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page|page-break-after|page-break-before|page-break-inside|pause|pause-after|pause-before|perspective|perspective-origin|pitch|pitch-range|play-during|pointer-events|polar-anchor|polar-angle|polar-distance|polar-origin|position|presentation-level|quotes|region-fragment|resize|rest|rest-after|rest-before|richness|right|rotation|rotation-point|ruby-align|ruby-merge|ruby-position|running|scrollbar-color|scroll-behavior|scroll-snap-align|scroll-snap-margin|scroll-snap-margin-block|scroll-snap-margin-block-end|scroll-snap-margin-block-start|scroll-snap-margin-bottom|scroll-snap-margin-inline|scroll-snap-margin-inline-end|scroll-snap-margin-inline-start|scroll-snap-margin-left|scroll-snap-margin-right|scroll-snap-margin-top|scroll-snap-padding|scroll-snap-padding-block|scroll-snap-padding-block-end|scroll-snap-padding-block-start|scroll-snap-padding-bottom|scroll-snap-padding-inline|scroll-snap-padding-inline-end|scroll-snap-padding-inline-start|scroll-snap-padding-left|scroll-snap-padding-right|scroll-snap-padding-top|scroll-snap-type|shape-image-threshold|shape-inside|shape-margin|shape-outside|size|speak|speak-as|speak-header|speak-numeral|speak-punctuation|speech-rate|stress|string-set|stroke|stroke-alignment|stroke-dashadjust|stroke-dasharray|stroke-dashcorner|stroke-dashoffset|stroke-linecap|stroke-linejoin|stroke-miterlimit|stroke-opacity|stroke-width|table-layout|tab-size|text-align|text-align-all|text-align-last|text-combine-upright|text-decoration|text-decoration-color|text-decoration-line|text-decoration-skip|text-decoration-style|text-emphasis|text-emphasis-color|text-emphasis-position|text-emphasis-style|text-indent|text-justify|text-orientation|text-overflow|text-shadow|text-space-collapse|text-space-trim|text-spacing|text-transform|text-underline-offset|text-underline-position|text-wrap|top|transform|transform-box|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch|voice-range|voice-rate|voice-stress|voice-volume|volume|white-space|widows|width|will-change|word-break|word-spacing|word-wrap|wrap-after|wrap-before|wrap-flow|wrap-inside|wrap-through|writing-mode|z-index):"
|
|
15
|
+
# - default:
|
|
16
|
+
# start: ":"
|
|
17
|
+
# end: "[;^\\{]"
|
|
18
|
+
# rules: []
|
|
19
|
+
- special: "!important"
|
|
20
|
+
- identifier: ":active|:focus|:hover|:link|:visited|:link|:after|:before|$"
|
|
21
|
+
- special: "(\\{|\\}|\\(|\\)|\\;|:|\\]|~|<|>|,)"
|
|
22
|
+
# SCSS Varaibles
|
|
23
|
+
- statement: "@import|@mixin|@extend"
|
|
24
|
+
# Strings
|
|
25
|
+
- constant.string:
|
|
26
|
+
start: "\""
|
|
27
|
+
end: "\""
|
|
28
|
+
skip: "\\\\."
|
|
29
|
+
rules:
|
|
30
|
+
- constant.specialChar: "\\\\."
|
|
31
|
+
- constant.string:
|
|
32
|
+
start: "'"
|
|
33
|
+
end: "'"
|
|
34
|
+
skip: "\\\\."
|
|
35
|
+
rules:
|
|
36
|
+
- constant.specialChar: "\\\\."
|
|
37
|
+
- special: "\"|'"
|
|
38
|
+
# Comments & TODOs
|
|
39
|
+
- comment:
|
|
40
|
+
start: "\\/\\*"
|
|
41
|
+
end: "\\*\\/"
|
|
42
|
+
rules:
|
|
43
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
44
|
+
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
filetype: cuda
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "(\\.cu[h]?$)"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- identifier: "\\b[A-Z_][0-9A-Z_]*\\b"
|
|
8
|
+
- type: "\\b(float|double|bool|char|int|short|long|enum|void|struct|union|typedef|(un)?signed|inline)\\b"
|
|
9
|
+
- type: "\\b(((s?size)|((u_?)?int(8|16|32|64|ptr))|char(8|16|32))_t|wchar_t)\\b"
|
|
10
|
+
- type: "\\b[a-z_][0-9a-z_]+(_t|_T)\\b"
|
|
11
|
+
- type: "\\b(final|override)\\b"
|
|
12
|
+
- type.keyword: "\\b(auto|volatile|const(expr|eval|init)?|mutable|register|thread_local|static|extern|decltype|explicit|virtual)\\b"
|
|
13
|
+
- statement: "\\b(class|namespace|template|typename|this|friend|using|public|protected|private|noexcept)\\b"
|
|
14
|
+
- statement: "\\b(concept|requires)\\b"
|
|
15
|
+
- statement: "\\b(import|export|module)\\b"
|
|
16
|
+
- statement: "\\b(for|if|while|do|else|case|default|switch)\\b"
|
|
17
|
+
- statement: "\\b(try|throw|catch|operator|new|delete|static_assert)\\b"
|
|
18
|
+
- statement: "\\b(goto|continue|break|return)\\b"
|
|
19
|
+
- preproc: "^[[:space:]]*#[[:space:]]*(define|pragma|include|(un|ifn?)def|endif|el(if|se)|if|warning|error)|_Pragma"
|
|
20
|
+
|
|
21
|
+
# Conditionally-supported/extension keywords
|
|
22
|
+
- statement: "\\b(asm|fortran)\\b"
|
|
23
|
+
|
|
24
|
+
# GCC builtins
|
|
25
|
+
- statement: "(__attribute__[[:space:]]*\\(\\([^)]*\\)\\)|__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__)"
|
|
26
|
+
|
|
27
|
+
# CUDA specific keywords
|
|
28
|
+
- statement: "__(global|device|host|shared)__"
|
|
29
|
+
|
|
30
|
+
# Operator Color
|
|
31
|
+
- symbol.operator: "[-+*/%=<>.:;,~&|^!?]|\\b(sizeof|alignof|typeid|(and|or|xor|not)(_eq)?|bitor|compl|bitand|(const|dynamic|reinterpret|static)_cast)\\b"
|
|
32
|
+
# Parenthetical Color
|
|
33
|
+
- symbol.brackets: "[(){}]|\\[|\\]"
|
|
34
|
+
# Integer Literals
|
|
35
|
+
- 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)"
|
|
36
|
+
# Decimal Floating-point Literals
|
|
37
|
+
- constant.number: "(\\b(([0-9']*[.][0-9']+|[0-9']+[.][0-9']*)([Ee][+-]?[0-9']+)?|[0-9']+[Ee][+-]?[0-9']+)[FfLl]?\\b)"
|
|
38
|
+
# Hexadecimal Floating-point Literals
|
|
39
|
+
- 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)"
|
|
40
|
+
- constant.bool: "(\\b(true|false|NULL|nullptr)\\b)"
|
|
41
|
+
|
|
42
|
+
- constant.string:
|
|
43
|
+
start: "\""
|
|
44
|
+
end: "\""
|
|
45
|
+
skip: "\\\\."
|
|
46
|
+
rules:
|
|
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
|
+
- constant.string:
|
|
50
|
+
start: "'"
|
|
51
|
+
end: "'"
|
|
52
|
+
skip: "\\\\."
|
|
53
|
+
rules:
|
|
54
|
+
- error: "..+"
|
|
55
|
+
- 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})"
|
|
56
|
+
|
|
57
|
+
- comment:
|
|
58
|
+
start: "//"
|
|
59
|
+
end: "$"
|
|
60
|
+
rules:
|
|
61
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
62
|
+
|
|
63
|
+
- comment:
|
|
64
|
+
start: "/\\*"
|
|
65
|
+
end: "\\*/"
|
|
66
|
+
rules:
|
|
67
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
68
|
+
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
filetype: cython
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.pyx$|\\.pxd$|\\.pyi$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
# Python Keyword Color
|
|
8
|
+
- statement: "\\b(and|as|assert|class|def|DEF|del|elif|ELIF|else|ELSE|except|exec|finally|for|from|global|if|IF|import|in|is|lambda|map|not|or|pass|print|raise|try|while|with|yield)\\b"
|
|
9
|
+
- special: "\\b(continue|break|return)\\b"
|
|
10
|
+
|
|
11
|
+
# Cython Keyword Color
|
|
12
|
+
- identifier.macro: "\\b(cdef|cimport|cpdef|cppclass|ctypedef|extern|include|namespace|property|struct)\\b"
|
|
13
|
+
- type: "\\b(bint|char|double|int|public|void|unsigned)\\b"
|
|
14
|
+
|
|
15
|
+
# Operator Color
|
|
16
|
+
- symbol: "[.:;,+*|=!\\%]|<|>|/|-|&"
|
|
17
|
+
|
|
18
|
+
# Parenthetical Color
|
|
19
|
+
- symbol.brackets: "[(){}]|\\[|\\]"
|
|
20
|
+
|
|
21
|
+
- constant.string:
|
|
22
|
+
start: "\"\"\""
|
|
23
|
+
end: "\"\"\""
|
|
24
|
+
rules:
|
|
25
|
+
- constant.specialChar: "\\\\."
|
|
26
|
+
|
|
27
|
+
- constant.string:
|
|
28
|
+
start: "'''"
|
|
29
|
+
end: "'''"
|
|
30
|
+
rules:
|
|
31
|
+
- constant.specialChar: "\\\\."
|
|
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
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
52
|
+
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
filetype: d
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.(d(i|d)?)$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
# Operators and punctuation
|
|
8
|
+
- statement: "(\\*|/|%|\\+|-|>>|<<|>>>|&|\\^(\\^)?|\\||~)?="
|
|
9
|
+
- statement: "\\.\\.(\\.)?|!|\\*|&|~|\\(|\\)|\\[|\\]|\\\\|/|\\+|-|%|<|>|\\?|:|;"
|
|
10
|
+
# Octal integer literals are deprecated
|
|
11
|
+
- error: "(0[0-7_]*)(L[uU]?|[uU]L?)?"
|
|
12
|
+
# Decimal integer literals
|
|
13
|
+
- constant.number: "([0-9]|[1-9][0-9_]*)(L[uU]?|[uU]L?)?\\b"
|
|
14
|
+
# Binary integer literals
|
|
15
|
+
- constant: "(0[bB][01_]*)(L[uU]?|[uU]L?)?"
|
|
16
|
+
# Decimal float literals
|
|
17
|
+
- constant.number: "[0-9][0-9_]*\\.([0-9][0-9_]*)([eE][+-]?([0-9][0-9_]*))?[fFL]?i?"
|
|
18
|
+
- constant.number: "[0-9][0-9_]*([eE][+-]?([0-9][0-9_]*))[fFL]?i?"
|
|
19
|
+
- constant.number: "[^.]\\.([0-9][0-9_]*)([eE][+-]?([0-9][0-9_]*))?[fFL]?i?"
|
|
20
|
+
- constant.number: "[0-9][0-9_]*([fFL]?i|[fF])"
|
|
21
|
+
# Hexadecimal integer literals
|
|
22
|
+
- constant.number: "(0[xX]([0-9a-fA-F][0-9a-fA-F_]*|[0-9a-fA-F_]*[0-9a-fA-F]))(L[uU]?|[uU]L?)?"
|
|
23
|
+
# Hexadecimal float literals
|
|
24
|
+
- constant.number: "0[xX]([0-9a-fA-F][0-9a-fA-F_]*|[0-9a-fA-F_]*[0-9a-fA-F])(\\.[0-9a-fA-F][0-9a-fA-F_]*|[0-9a-fA-F_]*[0-9a-fA-F])?[pP][+-]?([0-9][0-9_]*)[fFL]?i?"
|
|
25
|
+
- constant.number: "0[xX]\\.([0-9a-fA-F][0-9a-fA-F_]*|[0-9a-fA-F_]*[0-9a-fA-F])[pP][+-]?([0-9][0-9_]*)[fFL]?i?"
|
|
26
|
+
# Character literals
|
|
27
|
+
- constant.string:
|
|
28
|
+
start: "'"
|
|
29
|
+
end: "'"
|
|
30
|
+
skip: "\\\\."
|
|
31
|
+
rules:
|
|
32
|
+
- constant.specialChar: "\\\\."
|
|
33
|
+
# Keywords
|
|
34
|
+
# a-e
|
|
35
|
+
- statement: "\\b(abstract|alias|align|asm|assert|auto|body|break|case|cast|catch|class|const|continue|debug|default|delegate|do|else|enum|export|extern)\\b"
|
|
36
|
+
# f-l
|
|
37
|
+
- statement: "\\b(false|final|finally|for|foreach|foreach_reverse|function|goto|if|immutable|import|in|inout|interface|invariant|is|lazy)\\b"
|
|
38
|
+
# m-r
|
|
39
|
+
- statement: "\\b(macro|mixin|module|new|nothrow|null|out|override|package|pragma|private|protected|public|pure|ref|return)\\b"
|
|
40
|
+
# s-w
|
|
41
|
+
- statement: "\\b(scope|shared|static|struct|super|switch|synchronized|template|this|throw|true|try|typeid|typeof|union|unittest|version|while|with)\\b"
|
|
42
|
+
# __
|
|
43
|
+
- statement: "\\b(__FILE__|__MODULE__|__LINE__|__FUNCTION__|__PRETTY_FUNCTION__|__gshared|__traits|__vector|__parameters)\\b"
|
|
44
|
+
# Deprecated keywords
|
|
45
|
+
- error: "\\b(delete|deprecated|typedef|volatile)\\b"
|
|
46
|
+
# Primitive types
|
|
47
|
+
- type: "\\b(bool|byte|cdouble|cent|cfloat|char|creal|dchar|double|float|idouble|ifloat|int|ireal|long|real|short|ubyte|ucent|uint|ulong|ushort|void|wchar)\\b"
|
|
48
|
+
# Globally defined symbols
|
|
49
|
+
- type: "\\b(string|wstring|dstring|size_t|ptrdiff_t)\\b"
|
|
50
|
+
# Special tokens
|
|
51
|
+
- constant: "\\b(__DATE__|__EOF__|__TIME__|__TIMESTAMP__|__VENDOR__|__VERSION__)\\b"
|
|
52
|
+
# String literals
|
|
53
|
+
# DoubleQuotedString
|
|
54
|
+
- constant.string:
|
|
55
|
+
start: "\""
|
|
56
|
+
end: "\""
|
|
57
|
+
skip: "\\\\."
|
|
58
|
+
rules:
|
|
59
|
+
- constant.specialChar: "\\\\."
|
|
60
|
+
# WysiwygString
|
|
61
|
+
- constant.string:
|
|
62
|
+
start: "r\""
|
|
63
|
+
end: "\""
|
|
64
|
+
rules:
|
|
65
|
+
- constant.specialChar: "\\\\."
|
|
66
|
+
- constant.string:
|
|
67
|
+
start: "`"
|
|
68
|
+
end: "`"
|
|
69
|
+
rules:
|
|
70
|
+
- constant.specialChar: "\\\\."
|
|
71
|
+
# HexString
|
|
72
|
+
- constant.string:
|
|
73
|
+
start: "x\""
|
|
74
|
+
end: "\""
|
|
75
|
+
rules:
|
|
76
|
+
- constant.specialChar: "\\\\."
|
|
77
|
+
# DelimitedString
|
|
78
|
+
- constant.string:
|
|
79
|
+
start: "q\"\\("
|
|
80
|
+
end: "\\)\""
|
|
81
|
+
rules:
|
|
82
|
+
- constant.specialChar: "\\\\."
|
|
83
|
+
- constant.string:
|
|
84
|
+
start: "q\"\\{"
|
|
85
|
+
end: "q\"\\}"
|
|
86
|
+
rules:
|
|
87
|
+
- constant.specialChar: "\\\\."
|
|
88
|
+
- constant.string:
|
|
89
|
+
start: "q\"\\["
|
|
90
|
+
end: "q\"\\]"
|
|
91
|
+
rules:
|
|
92
|
+
- constant.specialChar: "\\\\."
|
|
93
|
+
- constant.string:
|
|
94
|
+
start: "q\"<"
|
|
95
|
+
end: "q\">"
|
|
96
|
+
rules:
|
|
97
|
+
- constant.specialChar: "\\\\."
|
|
98
|
+
- constant.string:
|
|
99
|
+
start: "q\"[^({[<\"][^\"]*$"
|
|
100
|
+
end: "^[^\"]+\""
|
|
101
|
+
rules:
|
|
102
|
+
- constant.specialChar: "\\\\."
|
|
103
|
+
- constant.string:
|
|
104
|
+
start: "q\"([^({[<\"])"
|
|
105
|
+
end: "\""
|
|
106
|
+
rules:
|
|
107
|
+
- constant.specialChar: "\\\\."
|
|
108
|
+
# Comments
|
|
109
|
+
- comment:
|
|
110
|
+
start: "//"
|
|
111
|
+
end: "$"
|
|
112
|
+
rules: []
|
|
113
|
+
- comment:
|
|
114
|
+
start: "/\\*"
|
|
115
|
+
end: "\\*/"
|
|
116
|
+
rules: []
|
|
117
|
+
- comment:
|
|
118
|
+
start: "/\\+"
|
|
119
|
+
end: "\\+/"
|
|
120
|
+
rules: []
|
|
121
|
+
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
filetype: dart
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.dart$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- constant.number: "\\b[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\\b"
|
|
8
|
+
- constant.number: "\\b[-+]?([0-9]+\\.[0-9]*|[0-9]*\\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?"
|
|
9
|
+
- constant.number: "\\b[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?"
|
|
10
|
+
- identifier: "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]"
|
|
11
|
+
- statement: "\\b(break|case|catch|continue|default|else|finally)\\b"
|
|
12
|
+
- statement: "\\b(for|function|get|if|in|as|is|new|return|set|switch|final|await|async|sync)\\b"
|
|
13
|
+
- statement: "\\b(switch|this|throw|try|var|void|while|with|import|library|part|const|export)\\b"
|
|
14
|
+
- constant: "\\b(true|false|null)\\b"
|
|
15
|
+
- type: "\\b(List|String)\\b"
|
|
16
|
+
- type: "\\b(int|num|double|bool)\\b"
|
|
17
|
+
- statement: "[-+/*=<>!~%?:&|]"
|
|
18
|
+
- constant: "/[^*]([^/]|(\\\\/))*[^\\\\]/[gim]*"
|
|
19
|
+
- constant: "\\\\[0-7][0-7]?[0-7]?|\\\\x[0-9a-fA-F]+|\\\\[bfnrt'\"\\?\\\\]"
|
|
20
|
+
|
|
21
|
+
- comment:
|
|
22
|
+
start: "//"
|
|
23
|
+
end: "$"
|
|
24
|
+
rules:
|
|
25
|
+
- todo: "TODO:?"
|
|
26
|
+
|
|
27
|
+
- comment:
|
|
28
|
+
start: "/\\*"
|
|
29
|
+
end: "\\*/"
|
|
30
|
+
rules:
|
|
31
|
+
- todo: "TODO:?"
|
|
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
|
+
|
|
@@ -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: []
|