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,114 @@
|
|
|
1
|
+
filetype: nu
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.nu$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- symbol: "[-+/*=<>!~%?:&|]"
|
|
8
|
+
# https://www.nushell.sh/book/command_reference.html
|
|
9
|
+
- statement: "\\b(agg-groups|agg|alias|all-false|all-true|all?|ansi gradient)\\b"
|
|
10
|
+
- statement: "\\b(ansi strip|ansi|any?|append|append|arg-max)\\b"
|
|
11
|
+
- statement: "\\b(arg-min|arg-sort|arg-true|arg-unique|as-date)\\b"
|
|
12
|
+
- statement: "\\b(as-datetime|as|benchmark|build-string|cache|cal|cd)\\b"
|
|
13
|
+
- statement: "\\b(char|clear|col|collect|columns|compact|complete)\\b"
|
|
14
|
+
- statement: "\\b(concatenate|config|config env|config nu|contains)\\b"
|
|
15
|
+
- statement: "\\b(count|count-null|cp|cumulative|date format|date humanize)\\b"
|
|
16
|
+
- statement: "\\b(date list-timezone|date now|date to-record|date to-table)\\b"
|
|
17
|
+
- statement: "\\b(date to-timezone|date|db and|db as|db col|db collect)\\b"
|
|
18
|
+
- statement: "\\b(db describe|db fn|db from|db group-by|db join|db limit)\\b"
|
|
19
|
+
- statement: "\\b(db open|db or|db order-by|db over|db query|db schema)\\b"
|
|
20
|
+
- statement: "\\b(db select|db testing|db where|db|debug|decode)\\b"
|
|
21
|
+
- statement: "\\b(def-env|default|def|describe|describe|detect columns)\\b"
|
|
22
|
+
- statement: "\\b(df-not|do|drop|drop|drop column|drop nth|drop-duplicates)\\b"
|
|
23
|
+
- statement: "\\b(drop-nulls|dtypes|du|each while|each|echo|empty?)\\b"
|
|
24
|
+
- statement: "\\b(enter|env|error make|every|exec|exit|explode)\\b"
|
|
25
|
+
- statement: "\\b(export alias|export def|export def-env|export env)\\b"
|
|
26
|
+
- statement: "\\b(export extern|export|expr-not|extern|fetch|fill-na)\\b"
|
|
27
|
+
- statement: "\\b(fill-null|filter-with|find|first|flatten)\\b"
|
|
28
|
+
- statement: "\\b(fmt|format filesize|format|for|from csv|from eml)\\b"
|
|
29
|
+
- statement: "\\b(from ics|from ini|from json|from nuon|from ods|from ssv)\\b"
|
|
30
|
+
- statement: "\\b(from toml|from tsv|from url|from vcf|from xlsx|from xml)\\b"
|
|
31
|
+
- statement: "\\b(from yaml|from yml|from|get-day|get-hour|get-minute)\\b"
|
|
32
|
+
- statement: "\\b(get-month|get-nanosecond|get-ordinal|get-second|get-week)\\b"
|
|
33
|
+
- statement: "\\b(get-weekday|get-year|get|glob|grid|group-by)\\b"
|
|
34
|
+
- statement: "\\b(group|gstat|g|hash base64|hash md5|hash sha256|hash)\\b"
|
|
35
|
+
- statement: "\\b(headers|help|hide|histogram|history|if|ignore)\\b"
|
|
36
|
+
- statement: "\\b(inc|input|insert|into binary|into bool|into datetime|into decimal)\\b"
|
|
37
|
+
- statement: "\\b(into duration|into filesize|into int|into string|into)\\b"
|
|
38
|
+
- statement: "\\b(is-admin|is-duplicated|is-in|is-not-null)\\b"
|
|
39
|
+
- statement: "\\b(is-null|is-unique|join|keep|keep until)\\b"
|
|
40
|
+
- statement: "\\b(keep while|keybindings default|keybindings listen|keybindings list)\\b"
|
|
41
|
+
- statement: "\\b(keybindings|kill|last|length|let-env|let)\\b"
|
|
42
|
+
- statement: "\\b(lines|list|lit|load-env|ls|ls-df|match|math abs)\\b"
|
|
43
|
+
- statement: "\\b(math avg|math ceil|math eval|math floor|math max)\\b"
|
|
44
|
+
- statement: "\\b(math median|math min|math mode|math product|math round)\\b"
|
|
45
|
+
- statement: "\\b(math sqrt|math stddev|math sum|math variance|math|max)\\b"
|
|
46
|
+
- statement: "\\b(mean|median|melt|merge|metadata)\\b"
|
|
47
|
+
- statement: "\\b(min|mkdir|module|move|mv|n|n-unique|n-unique)\\b"
|
|
48
|
+
- statement: "\\b(nth|nu-highlight|open|open-df|otherwise|overlay)\\b"
|
|
49
|
+
- statement: "\\b(overlay add|overlay list|overlay new|overlay remove|p)\\b"
|
|
50
|
+
- statement: "\\b(par-each|parse|path basename|path dirname|path exists)\\b"
|
|
51
|
+
- statement: "\\b(path expand|path join|path parse|path relative-to|path split)\\b"
|
|
52
|
+
- statement: "\\b(path type|path|pivot|post|prepend|print|ps|quantile)\\b"
|
|
53
|
+
- statement: "\\b(quantile|query json|query web|query xml|query|random bool)\\b"
|
|
54
|
+
- statement: "\\b(random chars|random decimal|random dice|random integer)\\b"
|
|
55
|
+
- statement: "\\b(random uuid|random|range|reduce|register|reject|rename)\\b"
|
|
56
|
+
- statement: "\\b(replace|replace-all|reverse|reverse|rm|roll down)\\b"
|
|
57
|
+
- statement: "\\b(roll left|roll right|roll up|rolling|roll|rotate)\\b"
|
|
58
|
+
- statement: "\\b(run-external|sample|save|select|select|seq|seq char)\\b"
|
|
59
|
+
- statement: "\\b(seq date|set|set-with-idx|shape|shells|shift|shuffle)\\b"
|
|
60
|
+
- statement: "\\b(size|skip until|skip while|skip|sleep|slice|sort)\\b"
|
|
61
|
+
- statement: "\\b(sort-by|source|split chars|split column|split row)\\b"
|
|
62
|
+
- statement: "\\b(split-by|split|std|std|str camel-case|str capitalize)\\b"
|
|
63
|
+
- statement: "\\b(str collect|str contains|str downcase|str ends-with|str find-replace)\\b"
|
|
64
|
+
- statement: "\\b(str index-of|str kebab-case|str length|str lpad|str pascal-case)\\b"
|
|
65
|
+
- statement: "\\b(str replace|str reverse|str rpad|str screaming-snake-case)\\b"
|
|
66
|
+
- statement: "\\b(str snake-case|str starts-with|str substring|str title-case)\\b"
|
|
67
|
+
- statement: "\\b(str to-datetime|str to-decimal|str to-int|str trim|str upcase)\\b"
|
|
68
|
+
- statement: "\\b(str-lengths|str-slice|strftime|str|sum|sys|table)\\b"
|
|
69
|
+
- statement: "\\b(take until|take while|take|term size|to csv)\\b"
|
|
70
|
+
- statement: "\\b(to html|to json|to md|to nuon|to text|to toml|to tsv)\\b"
|
|
71
|
+
- statement: "\\b(to url|to xml|to yaml|to-csv|to-df|to-dummies|to-lazy)\\b"
|
|
72
|
+
- statement: "\\b(to-lowercase|to-nu|to-parquet|to-uppercase|touch|to)\\b"
|
|
73
|
+
- statement: "\\b(transpose|tutor|unalias|uniq|unique|update|update cells)\\b"
|
|
74
|
+
- statement: "\\b(upsert|url host|url path|url query|url scheme|url)\\b"
|
|
75
|
+
- statement: "\\b(use|value-counts|var|version|view-source|watch)\\b"
|
|
76
|
+
- statement: "\\b(when|where|which|window|with-column|with-env|wrap)\\b"
|
|
77
|
+
# https://www.nushell.sh/book/types_of_data.html#booleans
|
|
78
|
+
- constant: "\\b(false|true)\\b"
|
|
79
|
+
- constant.number: "\\b[-+]?([1-9][0-9])*\\b"
|
|
80
|
+
# https://www.nushell.sh/book/types_of_data.html#binary-data
|
|
81
|
+
- constant.number: "\\b[-+]?(0(x|b|o)\\[[0-9a-fA-F ]+\\])"
|
|
82
|
+
# https://www.nushell.sh/book/types_of_data.html#file-sizes
|
|
83
|
+
- constant.number: "\\b[-+]?([0-9]+[BbMmGgTtPp][i]?[Bb]?)?\\b"
|
|
84
|
+
# https://www.nushell.sh/book/types_of_data.html#duration
|
|
85
|
+
- constant.number: "\\b[-+]?([0-9]+[num]?[s])?\\b"
|
|
86
|
+
- constant.number: "\\b[-+]?([0-9]+(sec|min|hr|day|wk))?\\b"
|
|
87
|
+
# https://www.nushell.sh/book/types_of_data.html#dates
|
|
88
|
+
- constant.number: "\\b([0-9]+[-][0-9]+[-][0-9]+([T][0-9]+[:][0-9]+[:][0-9]+)?([\\+][0-9]+[:][0-9]+)?)\\b"
|
|
89
|
+
# https://www.nushell.sh/book/types_of_data.html#ranges
|
|
90
|
+
- constant.number: "([0-9]+(\\.\\.)[0-9]+)?"
|
|
91
|
+
# https://www.nushell.sh/book/types_of_data.html#open-ended-ranges
|
|
92
|
+
- constant.number: "((\\.\\.)[0-9]+)?"
|
|
93
|
+
- constant.number: "([0-9]+(\\.\\.))?"
|
|
94
|
+
- comment:
|
|
95
|
+
start: "#"
|
|
96
|
+
end: "$"
|
|
97
|
+
rules: []
|
|
98
|
+
- comment:
|
|
99
|
+
start: "/\\*"
|
|
100
|
+
end: "\\*/"
|
|
101
|
+
rules:
|
|
102
|
+
- todo: "(FIXME|TODO|NOTE):?"
|
|
103
|
+
- constant.string:
|
|
104
|
+
start: "\""
|
|
105
|
+
end: "\""
|
|
106
|
+
skip: "\\\\."
|
|
107
|
+
rules:
|
|
108
|
+
- constant.specialChar: "\\\\."
|
|
109
|
+
- constant.string:
|
|
110
|
+
start: "'"
|
|
111
|
+
end: "'"
|
|
112
|
+
skip: "\\\\."
|
|
113
|
+
rules:
|
|
114
|
+
- constant.specialChar: "\\\\."
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
filetype: objective-c
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.(m|mm|h)$"
|
|
5
|
+
signature: "(obj|objective)-c|#import|@(encode|end|interface|implementation|selector|protocol|synchronized|try|catch|finally|property|optional|required|import|autoreleasepool)"
|
|
6
|
+
|
|
7
|
+
rules:
|
|
8
|
+
- type: "\\b(float|double|CGFloat|id|bool|BOOL|Boolean|char|int|short|long|sizeof|enum|void|static|const|struct|union|typedef|extern|(un)?signed|inline|Class|SEL|IMP|NS(U)?Integer)\\b"
|
|
9
|
+
- type: "\\b((s?size)|((u_?)?int(8|16|32|64|ptr)))_t\\b"
|
|
10
|
+
- type: "\\b[A-Z][A-Z][[:alnum:]]*\\b"
|
|
11
|
+
- type: "\\b[A-Za-z0-9_]*_t\\b"
|
|
12
|
+
- type: "\\bdispatch_[a-zA-Z0-9_]*_t\\b"
|
|
13
|
+
|
|
14
|
+
- statement: "(__attribute__[[:space:]]*\\(\\([^)]*\\)\\)|__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__|__unused|_Nonnull|_Nullable|__block|__builtin.*)"
|
|
15
|
+
- statement: "\\b(class|namespace|template|public|protected|private|typename|this|friend|virtual|using|mutable|volatile|register|explicit)\\b"
|
|
16
|
+
- statement: "\\b(for|if|while|do|else|case|default|switch)\\b"
|
|
17
|
+
- statement: "\\b(try|throw|catch|operator|new|delete)\\b"
|
|
18
|
+
- statement: "\\b(goto|continue|break|return)\\b"
|
|
19
|
+
- statement: "\\b(nonatomic|atomic|readonly|readwrite|strong|weak|assign)\\b"
|
|
20
|
+
- statement: "@(encode|end|interface|implementation|class|selector|protocol|synchronized|try|catch|finally|property|optional|required|import|autoreleasepool)"
|
|
21
|
+
|
|
22
|
+
- preproc: "^[[:space:]]*#[[:space:]]*(define|include|import|(un|ifn?)def|endif|el(if|se)|if|warning|error|pragma).*$"
|
|
23
|
+
- preproc: "__[A-Z0-9_]*__"
|
|
24
|
+
|
|
25
|
+
- special: "^[[:space:]]*[#|@][[:space:]]*(import|include)[[:space:]]*[\"|<].*\\/?[>|\"][[:space:]]*$"
|
|
26
|
+
|
|
27
|
+
- statement: "([.:;,+*|=!\\%\\[\\]]|<|>|/|-|&)"
|
|
28
|
+
|
|
29
|
+
- constant.number: "(\\b(-?)?[0-9]+\\b|\\b\\[0-9]+\\.[0-9]+\\b|\\b0x[0-9a-fA-F]+\\b)"
|
|
30
|
+
- constant: "(@\\[(\\\\.|[^\\]])*\\]|@\\{(\\\\.|[^\\}])*\\}|@\\((\\\\.|[^\\)])*\\))"
|
|
31
|
+
- constant: "\\b<(\\\\.[^\\>])*\\>\\b"
|
|
32
|
+
- constant: "\\b(nil|NULL|YES|NO|TRUE|true|FALSE|false|self)\\b"
|
|
33
|
+
- constant: "\\bk[[:alnum]]*\\b"
|
|
34
|
+
- constant.string: "'.'"
|
|
35
|
+
|
|
36
|
+
- constant.string:
|
|
37
|
+
start: "@\""
|
|
38
|
+
end: "\""
|
|
39
|
+
skip: "\\\\."
|
|
40
|
+
rules:
|
|
41
|
+
- constant.specialChar: "\\\\."
|
|
42
|
+
|
|
43
|
+
- constant.string:
|
|
44
|
+
start: "\""
|
|
45
|
+
end: "\""
|
|
46
|
+
skip: "\\\\."
|
|
47
|
+
rules:
|
|
48
|
+
- constant.specialChar: "\\\\."
|
|
49
|
+
|
|
50
|
+
- comment:
|
|
51
|
+
start: "//"
|
|
52
|
+
end: "$"
|
|
53
|
+
rules:
|
|
54
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
55
|
+
|
|
56
|
+
- comment:
|
|
57
|
+
start: "/\\*"
|
|
58
|
+
end: "\\*/"
|
|
59
|
+
rules:
|
|
60
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
filetype: ocaml
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.mli?$"
|
|
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
|
+
- type: "'[0-9A-Za-z_]+"
|
|
21
|
+
#constantes
|
|
22
|
+
- constant.bool: "\\b(true|false)\\b"
|
|
23
|
+
#modules/classes
|
|
24
|
+
- special: "\\b(include|inherit|initializer)\\b"
|
|
25
|
+
#expr modifiers
|
|
26
|
+
- special: "\\b(new|ref|mutable|lazy|assert|raise)\\b"
|
|
27
|
+
#character literal
|
|
28
|
+
- constant.string: "'(\\\\[0-7]{3}|\\\\x[A-Fa-f0-9]{2}|\\\\u[A-Fa-f0-9]{4}|\\\\U[A-Fa-f0-9]{8}|\\\\[abfnrtv'\\\"\\\\]|.)'"
|
|
29
|
+
- constant.specialChar: "\\\\[abfnrtv'\\\"\\\\]"
|
|
30
|
+
- constant.specialChar: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})"
|
|
31
|
+
#string literal
|
|
32
|
+
- constant.string:
|
|
33
|
+
start: "\""
|
|
34
|
+
end: "\""
|
|
35
|
+
skip: "\\\\."
|
|
36
|
+
rules:
|
|
37
|
+
- constant.specialChar: "%."
|
|
38
|
+
- constant.specialChar: "\\\\[abfnrtv'\\\"\\\\]"
|
|
39
|
+
- constant.specialChar: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})"
|
|
40
|
+
- comment:
|
|
41
|
+
start: "\\(\\*"
|
|
42
|
+
end: "\\*\\)"
|
|
43
|
+
rules: []
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# References
|
|
2
|
+
# https://github.com/micro-editor/micro/blob/master/runtime/syntax/go.yaml
|
|
3
|
+
# https://github.com/vim-scripts/octave.vim--/blob/master/syntax/octave.vim
|
|
4
|
+
#
|
|
5
|
+
# TODO
|
|
6
|
+
# include only needed operators
|
|
7
|
+
# ... highlighting
|
|
8
|
+
# built-in function highlighting?
|
|
9
|
+
# highlight eps/pi/e etc. as functions when followed by ()
|
|
10
|
+
# what are skip and error fields in strings?
|
|
11
|
+
# multiline comments not working
|
|
12
|
+
|
|
13
|
+
filetype: octave
|
|
14
|
+
|
|
15
|
+
detect:
|
|
16
|
+
filename: "\\.m$"
|
|
17
|
+
|
|
18
|
+
rules:
|
|
19
|
+
# Statements https://www.gnu.org/software/octave/doc/v4.0.0/Statements.html
|
|
20
|
+
- statement: "\\b(function|endfunction|return|end|global|persistent)\\b"
|
|
21
|
+
- statement: "\\b(if|elseif|else|endif|switch|case|otherwise|endswitch)\\b"
|
|
22
|
+
- statement: "\\b(while|endwhile|do|until|for|endfor|parfor|endparfor|break|continue)\\b"
|
|
23
|
+
- statement: "\\b(unwind_protect|unwind_protect_cleanup|end_unwind_protect|try|catch|end_try_catch)\\b"
|
|
24
|
+
|
|
25
|
+
# Operators
|
|
26
|
+
- symbol.operator: "[-+/*=<>!~%&|^]|:="
|
|
27
|
+
|
|
28
|
+
# Brackets
|
|
29
|
+
- symbol.brackets: "(\\{|\\})"
|
|
30
|
+
- symbol.brackets: "(\\(|\\))"
|
|
31
|
+
- symbol.brackets: "(\\[|\\])"
|
|
32
|
+
|
|
33
|
+
# Commas
|
|
34
|
+
- symbol: ","
|
|
35
|
+
|
|
36
|
+
# Numbers https://www.gnu.org/software/octave/doc/v4.0.1/Mathematical-Constants.html
|
|
37
|
+
- constant.number: "\\b([0-9]+|0x[0-9a-fA-F]*)\\b|'.'"
|
|
38
|
+
- constant.number: "\\b(pi|e|I|Inf|NaN|eps|realmax|realmin)\\b|"
|
|
39
|
+
|
|
40
|
+
# Boolean
|
|
41
|
+
- constant.bool: "\\b(true|false)\\b"
|
|
42
|
+
|
|
43
|
+
# Strings https://www.gnu.org/software/octave/doc/v4.0.1/Strings.html
|
|
44
|
+
- constant.string:
|
|
45
|
+
start: "\""
|
|
46
|
+
end: "\""
|
|
47
|
+
skip: "\\\\."
|
|
48
|
+
rules:
|
|
49
|
+
- constant.specialChar: "%"
|
|
50
|
+
- constant.specialChar: "\\\\[abfnrtv'\\\"\\\\]"
|
|
51
|
+
- constant.specialChar: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})"
|
|
52
|
+
|
|
53
|
+
- constant.string:
|
|
54
|
+
start: "'"
|
|
55
|
+
end: "'"
|
|
56
|
+
skip: "\\\\."
|
|
57
|
+
rules:
|
|
58
|
+
- error: "..+"
|
|
59
|
+
- constant.specialChar: "%"
|
|
60
|
+
- constant.specialChar: "\\\\[abfnrtv'\\\"\\\\]"
|
|
61
|
+
- constant.specialChar: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})"
|
|
62
|
+
|
|
63
|
+
# Comments https://www.gnu.org/software/octave/doc/v4.2.1/Comments.html
|
|
64
|
+
- comment:
|
|
65
|
+
start: "%"
|
|
66
|
+
end: "$"
|
|
67
|
+
rules:
|
|
68
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
69
|
+
- comment:
|
|
70
|
+
start: "#"
|
|
71
|
+
end: "$"
|
|
72
|
+
rules:
|
|
73
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
74
|
+
- comment:
|
|
75
|
+
start: "%{"
|
|
76
|
+
end: "%}"
|
|
77
|
+
rules:
|
|
78
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
79
|
+
- comment:
|
|
80
|
+
start: "#{"
|
|
81
|
+
end: "#}"
|
|
82
|
+
rules:
|
|
83
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
filetype: odin
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.odin$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
# Conditionals and control flow
|
|
8
|
+
- special: "\\b(asm|auto_cast|break|case|cast|context|continue|do|dynamic|fallthrough|return|transmute|using|where)\\b"
|
|
9
|
+
- statement: "\\b(else|for|if|switch|in|not_in|or_else|or_return|when)\\b"
|
|
10
|
+
- preproc: "\\b(assert|package|foreign|import|proc|defer|make|new|free|delete|copy|len|cap|append|raw_data)\\b"
|
|
11
|
+
- preproc: "\\b((size|align|offset|type|type_info|typeid)_of|offset_of_by_string)\\b"
|
|
12
|
+
- preproc: "\\b(swizzle|complex|quaternion|real|imag|jmag|kmag|conj|expand_to_tuple|min|max|abs|clamp|soa_zip|soa_unzip|transpose|outer_product|hadamard_product|matrix_flatten)\\b"
|
|
13
|
+
- symbol.operator: "[-+/*=<>!~%&|^@]|:\\s*=|:\\s*:|\\?"
|
|
14
|
+
|
|
15
|
+
# Types
|
|
16
|
+
- symbol: "(,|\\.)"
|
|
17
|
+
- type: "\\b(b(8|16|32|64)|(i|u)(8|(16|32|64|128)(le|be)?)|f(16|32|64)(le|be)?|complex(32|64|128)|quaternion(64|128|256))\\b"
|
|
18
|
+
- type: "\\b(any|bool|byte|rune|u?int|uintptr|rawptr|c?string|map|matrix|typeid)\\b"
|
|
19
|
+
- type.keyword: "\\b(distinct|struct|enum|union|bit_set)\\b"
|
|
20
|
+
- constant.bool: "\\b(true|false|nil)\\b"
|
|
21
|
+
|
|
22
|
+
# Brackets
|
|
23
|
+
- symbol.brackets: "(\\{|\\})"
|
|
24
|
+
- symbol.brackets: "(\\(|\\))"
|
|
25
|
+
- symbol.brackets: "(\\[|\\])"
|
|
26
|
+
|
|
27
|
+
# Numbers and strings
|
|
28
|
+
- constant.number: "\\b(0b[01]*|0o[0-7]*|0x[0-9a-fA-F]*|[0-9_]+|0d[0-9]*|0z[0-9abAB]*)\\b|'.'"
|
|
29
|
+
|
|
30
|
+
- constant.string:
|
|
31
|
+
start: "\""
|
|
32
|
+
end: "\""
|
|
33
|
+
skip: "\\\\."
|
|
34
|
+
rules:
|
|
35
|
+
- constant.specialChar: "%."
|
|
36
|
+
- constant.specialChar: "\\\\[abfnrtv'\\\"\\\\]"
|
|
37
|
+
- constant.specialChar: "\\\\([0-7]{1,3}|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})"
|
|
38
|
+
|
|
39
|
+
- constant.string:
|
|
40
|
+
start: "'"
|
|
41
|
+
end: "'"
|
|
42
|
+
skip: "\\\\."
|
|
43
|
+
rules:
|
|
44
|
+
- error: "..+"
|
|
45
|
+
- constant.specialChar: "%."
|
|
46
|
+
- constant.specialChar: "\\\\[abfnrtv'\\\"\\\\]"
|
|
47
|
+
- constant.specialChar: "\\\\([0-7]{1,3}|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})"
|
|
48
|
+
|
|
49
|
+
- constant.string:
|
|
50
|
+
start: "`"
|
|
51
|
+
end: "`"
|
|
52
|
+
rules: []
|
|
53
|
+
|
|
54
|
+
- comment:
|
|
55
|
+
start: "//"
|
|
56
|
+
end: "$"
|
|
57
|
+
rules:
|
|
58
|
+
- todo: "TODO:?|NOTE(\\(.*\\))?:?"
|
|
59
|
+
|
|
60
|
+
- comment:
|
|
61
|
+
start: "/\\*"
|
|
62
|
+
end: "\\*/"
|
|
63
|
+
rules:
|
|
64
|
+
- todo: "TODO:?|NOTE(\\(.*\\))?:?"
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
filetype: pascal
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.pas$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- type: "\\b(?i:(string|ansistring|widestring|shortstring|char|ansichar|widechar|boolean|byte|shortint|word|smallint|longword|cardinal|longint|integer|int64|single|currency|double|extended))\\b"
|
|
8
|
+
- statement: "\\b(?i:(and|asm|array|begin|break|case|const|constructor|continue|destructor|div|do|downto|else|end|file|for|function|goto|if|implementation|in|inline|interface|label|mod|not|object|of|on|operator|or|packed|procedure|program|record|repeat|resourcestring|set|shl|shr|then|to|type|unit|until|uses|var|while|with|xor))\\b"
|
|
9
|
+
- statement: "\\b(?i:(as|class|dispose|except|exit|exports|finalization|finally|inherited|initialization|is|library|new|on|out|property|raise|self|threadvar|try))\\b"
|
|
10
|
+
- statement: "\\b(?i:(absolute|abstract|alias|assembler|cdecl|cppdecl|default|export|external|forward|generic|index|local|name|nostackframe|oldfpccall|override|pascal|private|protected|public|published|read|register|reintroduce|safecall|softfloat|specialize|stdcall|virtual|write))\\b"
|
|
11
|
+
- constant: "\\b(?i:(false|true|nil))\\b"
|
|
12
|
+
- special:
|
|
13
|
+
start: "asm"
|
|
14
|
+
end: "end"
|
|
15
|
+
rules: []
|
|
16
|
+
- constant.number: "\\$[0-9A-Fa-f]+"
|
|
17
|
+
- constant.number: "\\b[+-]?[0-9]+([.]?[0-9]+)?(?i:e[+-]?[0-9]+)?"
|
|
18
|
+
- constant.string:
|
|
19
|
+
start: "#[0-9]{1,}"
|
|
20
|
+
end: "$"
|
|
21
|
+
rules:
|
|
22
|
+
- constant.specialChar: "\\\\."
|
|
23
|
+
- constant.string:
|
|
24
|
+
start: "'"
|
|
25
|
+
end: "'"
|
|
26
|
+
skip: "\\\\."
|
|
27
|
+
rules:
|
|
28
|
+
- constant.specialChar: "\\\\."
|
|
29
|
+
- preproc:
|
|
30
|
+
start: "{\\$"
|
|
31
|
+
end: "}"
|
|
32
|
+
rules: []
|
|
33
|
+
- comment:
|
|
34
|
+
start: "//"
|
|
35
|
+
end: "$"
|
|
36
|
+
rules: []
|
|
37
|
+
- comment:
|
|
38
|
+
start: "\\(\\*"
|
|
39
|
+
end: "\\*\\)"
|
|
40
|
+
rules: []
|
|
41
|
+
- comment:
|
|
42
|
+
start: "({)(?:[^$])"
|
|
43
|
+
end: "}"
|
|
44
|
+
rules: []
|
|
45
|
+
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
filetype: patch
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.(patch|diff)$"
|
|
5
|
+
header: "^diff"
|
|
6
|
+
|
|
7
|
+
rules:
|
|
8
|
+
- brightgreen: "^\\+.*"
|
|
9
|
+
- green: "^\\+\\+\\+.*"
|
|
10
|
+
- brightblue: "^ .*"
|
|
11
|
+
- brightred: "^-.*"
|
|
12
|
+
- red: "^---.*"
|
|
13
|
+
- brightyellow: "^@@.*"
|
|
14
|
+
- magenta: "^diff.*"
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
filetype: peg
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.l?peg$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- identifier: "^[[:space:]]*[A-Za-z][A-Za-z0-9_]*[[:space:]]*<-"
|
|
8
|
+
- constant.number: "\\^[+-]?[0-9]+"
|
|
9
|
+
- symbol.operator: "[-+*?^/!&]|->|<-|=>"
|
|
10
|
+
- identifier.var: "%[A-Za-z][A-Za-z0-9_]*"
|
|
11
|
+
- special: "\\[[^]]*\\]"
|
|
12
|
+
- constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
|
|
13
|
+
- comment: "(^|[[:space:]])\\-\\-.*$"
|
|
14
|
+
- todo: "TODO:?"
|
|
15
|
+
- indent-char.whitespace: "[[:space:]]+$"
|
|
16
|
+
- indent-char: " + +| + +"
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
filetype: perl
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.p[lmp]$"
|
|
5
|
+
header: "^#!.*/(env +)?perl( |$)"
|
|
6
|
+
|
|
7
|
+
rules:
|
|
8
|
+
- type: "\\b(accept|alarm|atan2|bin(d|mode)|c(aller|homp|h(dir|mod|op|own|root)|lose(dir)?|onnect|os|rypt)|d(bm(close|open)|efined|elete|ie|o|ump)|e(ach|of|val|x(ec|ists|it|p))|f(cntl|ileno|lock|ork))\\b|\\b(get(c|login|peername|pgrp|ppid|priority|pwnam|(host|net|proto|serv)byname|pwuid|grgid|(host|net)byaddr|protobynumber|servbyport)|([gs]et|end)(pw|gr|host|net|proto|serv)ent|getsock(name|opt)|gmtime|goto|grep|hex|index|int|ioctl|join)\\b|\\b(keys|kill|last|length|link|listen|local(time)?|log|lstat|m|mkdir|msg(ctl|get|snd|rcv)|next|oct|open(dir)?|ord|pack|pipe|pop|printf?|push|q|qq|qx|rand|re(ad(dir|link)?|cv|say|do|name|quire|set|turn|verse|winddir)|rindex|rmdir|s|scalar|seek(dir)?)\\b|\\b(se(lect|mctl|mget|mop|nd|tpgrp|tpriority|tsockopt)|shift|shm(ctl|get|read|write)|shutdown|sin|sleep|socket(pair)?|sort|spli(ce|t)|sprintf|sqrt|srand|stat|study|substr|symlink|sys(call|read|tem|write)|tell(dir)?|time|tr(y)?|truncate|umask)\\b|\\b(un(def|link|pack|shift)|utime|values|vec|wait(pid)?|wantarray|warn|write)\\b"
|
|
9
|
+
- statement: "\\b(continue|else|elsif|do|for|foreach|if|unless|until|while|eq|ne|lt|gt|le|ge|cmp|x|my|sub|use|package|can|isa)\\b"
|
|
10
|
+
|
|
11
|
+
- special: "\\-\\>"
|
|
12
|
+
- symbol: "(,|\\.)"
|
|
13
|
+
|
|
14
|
+
#regexes
|
|
15
|
+
- identifier.macro: "m?\\/.*?\\/[a-z]*"
|
|
16
|
+
- identifier.macro: "m?\\|.*?\\|[a-z]*"
|
|
17
|
+
- identifier.macro: "\\bs/.*?/.*?/[a-z]*"
|
|
18
|
+
- identifier.macro: "\\bs\\|.*?\\|.*?\\|[a-z]*"
|
|
19
|
+
|
|
20
|
+
- constant.string:
|
|
21
|
+
start: '"'
|
|
22
|
+
end: '"'
|
|
23
|
+
skip: '\\"'
|
|
24
|
+
rules:
|
|
25
|
+
- identifier.var: '[\\$@%].[a-zA-Z0-9_]*'
|
|
26
|
+
|
|
27
|
+
- constant.string:
|
|
28
|
+
start: "'"
|
|
29
|
+
end: "'"
|
|
30
|
+
skip: "\\\\'"
|
|
31
|
+
rules: []
|
|
32
|
+
|
|
33
|
+
- comment:
|
|
34
|
+
start: "#"
|
|
35
|
+
end: "$"
|
|
36
|
+
rules: []
|
|
37
|
+
|
|
38
|
+
- constant.string: "\"\\(.*\\)\"|qq?\\|.*\\||qq?\\{.*\\}|qq?\\/.*\\/"
|
|
39
|
+
- constant.number: "\\b([0-9]*[.])?[0-9]+"
|
|
40
|
+
- constant.number: "\\b[0-9]+"
|
|
41
|
+
- constant.number: "\\b0x[a-f0-9]+"
|
|
42
|
+
- constant.string.url: "`(.+?)`"
|
|
43
|
+
- identifier.var: '[\\$@%].[a-zA-Z0-9_]*'
|
|
44
|
+
|
|
45
|
+
- preproc:
|
|
46
|
+
start: "(^use| = new)"
|
|
47
|
+
end: ";"
|
|
48
|
+
rules: []
|
|
49
|
+
|
|
50
|
+
- comment:
|
|
51
|
+
start: "^="
|
|
52
|
+
end: "^=cut"
|
|
53
|
+
rules: []
|
|
54
|
+
|
|
55
|
+
- identifier.macro:
|
|
56
|
+
start: "<< 'STOP'"
|
|
57
|
+
end: "STOP"
|
|
58
|
+
rules: []
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
filetype: php
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.php[2345s~]?$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- symbol.operator: "<|>"
|
|
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
|
+
- preproc: "<\\?(php|=)?"
|
|
13
|
+
- preproc: "\\?>"
|
|
14
|
+
- preproc: "<!DOCTYPE.+?>"
|
|
15
|
+
- special: "&[^;[[:space:]]]*;"
|
|
16
|
+
- symbol: "[:=]"
|
|
17
|
+
- identifier: "(alt|bgcolor|height|href|label|longdesc|name|onclick|onfocus|onload|onmouseover|size|span|src|style|target|type|value|width)="
|
|
18
|
+
- constant.number: "(?i)#[0-9a-fA-F]{6,6}"
|
|
19
|
+
- constant.string.url: "(ftp(s)?|http(s)?|git|chrome)://[^ ]+"
|
|
20
|
+
- comment: "<!--.+?-->"
|
|
21
|
+
- default: "<\\?(php|=)\" end=\"\\?>"
|
|
22
|
+
- identifier.class: "([a-zA-Z0-9_-]+)\\("
|
|
23
|
+
- type: "\\b(array|bool|callable|float|int|iterable|object|mixed|string|void)\\b"
|
|
24
|
+
- identifier.class: "[a-zA-Z\\\\]+::"
|
|
25
|
+
- identifier: "\\b([A-Z][a-zA-Z0-9_]+)\\b"
|
|
26
|
+
- identifier: "([A-Z0-9_]+)[;|\\s|\\)|,]"
|
|
27
|
+
- type.keyword: "\\b(global|final|public|private|protected|static|const|var)\\b"
|
|
28
|
+
- statement: "\\b(abstract|catch|class|declare|do|else(if)?|end(declare|for(each)?|if|switch|while)|enum|finally|for(each)|function|if|interface|namespace|switch|trait|try|while)\\b"
|
|
29
|
+
- identifier: "\\bnew\\s+([a-zA-Z0-9\\\\]+)"
|
|
30
|
+
- special: "\\b(as|and|break|case|clone|continue|default|die|fn|echo|empty|eval|exit|extends|goto|or|include(_once)?|implements|instanceof|insteadof|isset|list|match|new|print|return|require(_once)?|unset|use|throw|xor|yield(\\s+from))\\b"
|
|
31
|
+
- constant.bool: "\\b(true|false|null|TRUE|FALSE|NULL)\\b"
|
|
32
|
+
- constant: "[\\s|=|\\s|\\(|/|+|-|\\*|\\[]"
|
|
33
|
+
- constant.number: "[0-9]"
|
|
34
|
+
- identifier: "(\\$this|parent|self|\\$this->)"
|
|
35
|
+
- symbol.operator: "(=>|===|!==|==|!=|&&|\\|\\||::|=|->|\\!)"
|
|
36
|
+
- identifier.var: "(\\$[a-zA-Z0-9\\-_]+)"
|
|
37
|
+
- symbol.operator: "[\\(|\\)|/|+|\\-|\\*|\\[|.|,|;]"
|
|
38
|
+
- symbol.brackets: "(\\[|\\]|\\{|\\}|[()])"
|
|
39
|
+
|
|
40
|
+
- comment:
|
|
41
|
+
start: "(^|[[:space:]])*(//|#)"
|
|
42
|
+
end: "$"
|
|
43
|
+
rules: []
|
|
44
|
+
- comment:
|
|
45
|
+
start: "/\\*"
|
|
46
|
+
end: "\\*/"
|
|
47
|
+
rules: []
|
|
48
|
+
|
|
49
|
+
- constant.string:
|
|
50
|
+
start: "\""
|
|
51
|
+
end: "\""
|
|
52
|
+
skip: "\\\\."
|
|
53
|
+
rules:
|
|
54
|
+
- constant.specialChar: "\\\\[abfnrtv'\\\"\\\\]"
|
|
55
|
+
- constant.string:
|
|
56
|
+
start: "'"
|
|
57
|
+
end: "'"
|
|
58
|
+
skip: "\\\\."
|
|
59
|
+
rules:
|
|
60
|
+
- constant.specialChar: "\\\\[abfnrtv'\\\"\\\\]"
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
filetype: pc
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.pc$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- preproc: "^(Name|Description|URL|Version|Conflicts|Cflags):"
|
|
8
|
+
- preproc: "^(Requires|Libs)(\\.private)?:"
|
|
9
|
+
- symbol.operator: "="
|
|
10
|
+
- identifier.var: "\\$\\{[A-Za-z_][A-Za-z0-9_]*\\}"
|
|
11
|
+
- indent-char.whitespace: "[[:space:]]+$"
|
|
12
|
+
- indent-char: " + +| + +"
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
filetype: po
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.pot?$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- preproc: "\\b(msgid|msgstr)\\b"
|
|
8
|
+
- constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
|
|
9
|
+
- special: "\\\\.?"
|
|
10
|
+
- comment: "(^|[[:space:]])#([^{].*)?$"
|
|
11
|
+
- indent-char.whitespace: "[[:space:]]+$"
|
|
12
|
+
- indent-char: " + +| + +"
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
filetype: pony
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.pony$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- statement: "\\b(type|interface|trait|primitive|class|struct|actor)\\b"
|
|
8
|
+
- statement: "\\b(compiler_intrinsic)\\b"
|
|
9
|
+
- statement: "\\b(use)\\b"
|
|
10
|
+
- statement: "\\b(var|let|embed)\\b"
|
|
11
|
+
- statement: "\\b(new|be|fun)\\b"
|
|
12
|
+
- statement: "\\b(iso|trn|ref|val|box|tag|consume)\\b"
|
|
13
|
+
- statement: "\\b(break|continue|return|error)\\b"
|
|
14
|
+
- statement: "\\b(if|then|elseif|else|end|match|where|try|with|as|recover|object|lambda|as|digestof|ifdef)\\b"
|
|
15
|
+
- statement: "\\b(while|do|repeat|until|for|in)\\b"
|
|
16
|
+
- statement: "(\\?|=>)"
|
|
17
|
+
- statement: "(\\||\\&|\\,|\\^)"
|
|
18
|
+
- symbol.operator: "(\\-|\\+|\\*|/|\\!|%|<<|>>)"
|
|
19
|
+
- symbol.operator: "(==|!=|<=|>=|<|>)"
|
|
20
|
+
- statement: "\\b(is|isnt|not|and|or|xor)\\b"
|
|
21
|
+
- type: "\\b(_*[A-Z][_a-zA-Z0-9\\']*)\\b"
|
|
22
|
+
- constant: "\\b(this)\\b"
|
|
23
|
+
- constant.bool: "\\b(true|false)\\b"
|
|
24
|
+
- constant.number: "\\b((0b[0-1_]*)|(0o[0-7_]*)|(0x[0-9a-fA-F_]*)|([0-9_]+(\\.[0-9_]+)?((e|E)(\\\\+|-)?[0-9_]+)?))\\b"
|
|
25
|
+
- constant.string: "\"(\\\\.|[^\"])*\""
|
|
26
|
+
- comment:
|
|
27
|
+
start: "\"\"\"[^\"]*"
|
|
28
|
+
end: "\"\"\""
|
|
29
|
+
rules: []
|
|
30
|
+
|
|
31
|
+
- comment: "(^|[[:space:]])//.*"
|
|
32
|
+
- comment:
|
|
33
|
+
start: "/\\*"
|
|
34
|
+
end: "\\*/"
|
|
35
|
+
rules: []
|
|
36
|
+
|
|
37
|
+
- todo: "TODO:?"
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
filetype: pov
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.(pov|POV|povray|POVRAY)$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- preproc: "^[[:space:]]*#[[:space:]]*(declare)"
|
|
8
|
+
- statement: "\\b(sphere|cylinder|translate|matrix|rotate|scale)\\b"
|
|
9
|
+
- statement: "\\b(orthographic|location|up|right|direction|clipped_by)\\b"
|
|
10
|
+
- statement: "\\b(fog_type|fog_offset|fog_alt|rgb|distance|transform)\\b"
|
|
11
|
+
- identifier: "^\\b(texture)\\b"
|
|
12
|
+
- identifier: "\\b(light_source|background)\\b"
|
|
13
|
+
- identifier: "\\b(fog|object|camera)\\b"
|
|
14
|
+
- symbol.operator: "(\\{|\\}|\\(|\\)|\\;|\\]|\\[|`|\\\\|\\$|<|>|!|=|&|\\|)"
|
|
15
|
+
- special: "\\b(union|group|subgroup)\\b"
|
|
16
|
+
- comment: "//.*"
|
|
17
|
+
- comment:
|
|
18
|
+
start: "/\\*"
|
|
19
|
+
end: "\\*/"
|
|
20
|
+
rules: []
|
|
21
|
+
|