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.
Files changed (258) hide show
  1. package/CHANGELOG.md +76 -0
  2. package/LICENSE +22 -0
  3. package/README.md +285 -0
  4. package/package.json +17 -0
  5. package/project_structure.txt +35 -0
  6. package/runmd.mjs +240 -0
  7. package/runtime/colorschemes/atom-dark.micro +33 -0
  8. package/runtime/colorschemes/bubblegum.micro +31 -0
  9. package/runtime/colorschemes/cmc-16.micro +47 -0
  10. package/runtime/colorschemes/cmc-tc.micro +43 -0
  11. package/runtime/colorschemes/darcula.micro +34 -0
  12. package/runtime/colorschemes/default.micro +1 -0
  13. package/runtime/colorschemes/dracula-tc.micro +49 -0
  14. package/runtime/colorschemes/dukedark-tc.micro +38 -0
  15. package/runtime/colorschemes/dukelight-tc.micro +38 -0
  16. package/runtime/colorschemes/dukeubuntu-tc.micro +38 -0
  17. package/runtime/colorschemes/geany.micro +29 -0
  18. package/runtime/colorschemes/gotham.micro +29 -0
  19. package/runtime/colorschemes/gruvbox-tc.micro +29 -0
  20. package/runtime/colorschemes/gruvbox.micro +26 -0
  21. package/runtime/colorschemes/material-tc.micro +36 -0
  22. package/runtime/colorschemes/monokai-dark.micro +28 -0
  23. package/runtime/colorschemes/monokai.micro +34 -0
  24. package/runtime/colorschemes/one-dark.micro +39 -0
  25. package/runtime/colorschemes/railscast.micro +37 -0
  26. package/runtime/colorschemes/simple.micro +33 -0
  27. package/runtime/colorschemes/solarized-tc.micro +31 -0
  28. package/runtime/colorschemes/solarized.micro +30 -0
  29. package/runtime/colorschemes/sunny-day.micro +29 -0
  30. package/runtime/colorschemes/twilight.micro +40 -0
  31. package/runtime/colorschemes/zenburn.micro +30 -0
  32. package/runtime/help/actions.md +161 -0
  33. package/runtime/help/cdp.md +119 -0
  34. package/runtime/help/colors.md +421 -0
  35. package/runtime/help/commands.md +161 -0
  36. package/runtime/help/copypaste.md +149 -0
  37. package/runtime/help/defaultkeys.md +148 -0
  38. package/runtime/help/help.md +285 -0
  39. package/runtime/help/keybindings.md +355 -0
  40. package/runtime/help/linter.md +90 -0
  41. package/runtime/help/options.md +709 -0
  42. package/runtime/help/plugins.md +544 -0
  43. package/runtime/help/tutorial.md +112 -0
  44. package/runtime/jsplugins/cdp/cdp-server.js +1161 -0
  45. package/runtime/jsplugins/cdp/cdp.js +192 -0
  46. package/runtime/jsplugins/chapter/chapter.js +108 -0
  47. package/runtime/jsplugins/diff/diff.js +46 -0
  48. package/runtime/jsplugins/example/example.js +110 -0
  49. package/runtime/jsplugins/linter/linter.js +281 -0
  50. package/runtime/plugins/autoclose/autoclose.lua +75 -0
  51. package/runtime/plugins/ftoptions/ftoptions.lua +17 -0
  52. package/runtime/plugins/literate/README.md +5 -0
  53. package/runtime/plugins/literate/literate.lua +55 -0
  54. package/runtime/plugins/status/help/status.md +21 -0
  55. package/runtime/plugins/status/status.lua +62 -0
  56. package/runtime/syntax/LICENSE +22 -0
  57. package/runtime/syntax/PowerShell.yaml +128 -0
  58. package/runtime/syntax/README.md +63 -0
  59. package/runtime/syntax/ada.yaml +43 -0
  60. package/runtime/syntax/apacheconf.yaml +59 -0
  61. package/runtime/syntax/arduino.yaml +101 -0
  62. package/runtime/syntax/asciidoc.yaml +51 -0
  63. package/runtime/syntax/asm.yaml +123 -0
  64. package/runtime/syntax/ats.yaml +99 -0
  65. package/runtime/syntax/awk.yaml +44 -0
  66. package/runtime/syntax/b.yaml +87 -0
  67. package/runtime/syntax/bat.yaml +57 -0
  68. package/runtime/syntax/c.yaml +60 -0
  69. package/runtime/syntax/caddyfile.yaml +23 -0
  70. package/runtime/syntax/cake.yaml +7 -0
  71. package/runtime/syntax/clojure.yaml +38 -0
  72. package/runtime/syntax/cmake.yaml +42 -0
  73. package/runtime/syntax/coffeescript.yaml +56 -0
  74. package/runtime/syntax/colortest.yaml +19 -0
  75. package/runtime/syntax/conky.yaml +17 -0
  76. package/runtime/syntax/cpp.yaml +91 -0
  77. package/runtime/syntax/crontab.yaml +36 -0
  78. package/runtime/syntax/crystal.yaml +72 -0
  79. package/runtime/syntax/csharp.yaml +52 -0
  80. package/runtime/syntax/css.yaml +44 -0
  81. package/runtime/syntax/csx.yaml +8 -0
  82. package/runtime/syntax/cuda.yaml +68 -0
  83. package/runtime/syntax/cython.yaml +52 -0
  84. package/runtime/syntax/d.yaml +121 -0
  85. package/runtime/syntax/dart.yaml +46 -0
  86. package/runtime/syntax/default.yaml +10 -0
  87. package/runtime/syntax/dockerfile.yaml +36 -0
  88. package/runtime/syntax/dot.yaml +29 -0
  89. package/runtime/syntax/elixir.yaml +30 -0
  90. package/runtime/syntax/elm.yaml +38 -0
  91. package/runtime/syntax/erb.yaml +42 -0
  92. package/runtime/syntax/erlang.yaml +45 -0
  93. package/runtime/syntax/fish.yaml +48 -0
  94. package/runtime/syntax/forth.yaml +34 -0
  95. package/runtime/syntax/fortran.yaml +64 -0
  96. package/runtime/syntax/freebsd-kernel.yaml +14 -0
  97. package/runtime/syntax/fsharp.yaml +48 -0
  98. package/runtime/syntax/gdscript.yaml +61 -0
  99. package/runtime/syntax/gemini.yaml +19 -0
  100. package/runtime/syntax/gentoo-ebuild.yaml +48 -0
  101. package/runtime/syntax/gentoo-etc-portage.yaml +23 -0
  102. package/runtime/syntax/git-commit.yaml +35 -0
  103. package/runtime/syntax/git-config.yaml +14 -0
  104. package/runtime/syntax/git-rebase-todo.yaml +19 -0
  105. package/runtime/syntax/gleam.yaml +69 -0
  106. package/runtime/syntax/glsl.yaml +26 -0
  107. package/runtime/syntax/gnuplot.yaml +15 -0
  108. package/runtime/syntax/go.yaml +62 -0
  109. package/runtime/syntax/godoc.yaml +17 -0
  110. package/runtime/syntax/golo.yaml +73 -0
  111. package/runtime/syntax/gomod.yaml +31 -0
  112. package/runtime/syntax/graphql.yaml +47 -0
  113. package/runtime/syntax/groff.yaml +30 -0
  114. package/runtime/syntax/groovy.yaml +111 -0
  115. package/runtime/syntax/haml.yaml +16 -0
  116. package/runtime/syntax/hare.yaml +52 -0
  117. package/runtime/syntax/haskell.yaml +52 -0
  118. package/runtime/syntax/hc.yaml +52 -0
  119. package/runtime/syntax/html.yaml +70 -0
  120. package/runtime/syntax/html4.yaml +25 -0
  121. package/runtime/syntax/html5.yaml +25 -0
  122. package/runtime/syntax/ini.yaml +23 -0
  123. package/runtime/syntax/inputrc.yaml +14 -0
  124. package/runtime/syntax/java.yaml +37 -0
  125. package/runtime/syntax/javascript.yaml +124 -0
  126. package/runtime/syntax/jinja2.yaml +19 -0
  127. package/runtime/syntax/json.yaml +39 -0
  128. package/runtime/syntax/jsonnet.yaml +92 -0
  129. package/runtime/syntax/julia.yaml +57 -0
  130. package/runtime/syntax/justfile.yaml +40 -0
  131. package/runtime/syntax/keymap.yaml +27 -0
  132. package/runtime/syntax/kickstart.yaml +16 -0
  133. package/runtime/syntax/kotlin.yaml +66 -0
  134. package/runtime/syntax/kvlang.yaml +67 -0
  135. package/runtime/syntax/ledger.yaml +14 -0
  136. package/runtime/syntax/lfe.yaml +17 -0
  137. package/runtime/syntax/lilypond.yaml +26 -0
  138. package/runtime/syntax/lisp.yaml +17 -0
  139. package/runtime/syntax/log.yaml +92 -0
  140. package/runtime/syntax/lua.yaml +111 -0
  141. package/runtime/syntax/mail.yaml +25 -0
  142. package/runtime/syntax/makefile.yaml +38 -0
  143. package/runtime/syntax/man.yaml +12 -0
  144. package/runtime/syntax/markdown.yaml +49 -0
  145. package/runtime/syntax/mc.yaml +23 -0
  146. package/runtime/syntax/meson.yaml +51 -0
  147. package/runtime/syntax/micro.yaml +34 -0
  148. package/runtime/syntax/mpdconf.yaml +13 -0
  149. package/runtime/syntax/msbuild.yaml +6 -0
  150. package/runtime/syntax/nanorc.yaml +16 -0
  151. package/runtime/syntax/nftables.yaml +30 -0
  152. package/runtime/syntax/nginx.yaml +22 -0
  153. package/runtime/syntax/nim.yaml +27 -0
  154. package/runtime/syntax/nix.yaml +32 -0
  155. package/runtime/syntax/nu.yaml +114 -0
  156. package/runtime/syntax/objc.yaml +60 -0
  157. package/runtime/syntax/ocaml.yaml +43 -0
  158. package/runtime/syntax/octave.yaml +83 -0
  159. package/runtime/syntax/odin.yaml +64 -0
  160. package/runtime/syntax/pascal.yaml +45 -0
  161. package/runtime/syntax/patch.yaml +14 -0
  162. package/runtime/syntax/peg.yaml +16 -0
  163. package/runtime/syntax/perl.yaml +58 -0
  164. package/runtime/syntax/php.yaml +60 -0
  165. package/runtime/syntax/pkg-config.yaml +12 -0
  166. package/runtime/syntax/po.yaml +12 -0
  167. package/runtime/syntax/pony.yaml +37 -0
  168. package/runtime/syntax/pov.yaml +21 -0
  169. package/runtime/syntax/privoxy-action.yaml +14 -0
  170. package/runtime/syntax/privoxy-config.yaml +10 -0
  171. package/runtime/syntax/privoxy-filter.yaml +12 -0
  172. package/runtime/syntax/proto.yaml +40 -0
  173. package/runtime/syntax/prql.yaml +84 -0
  174. package/runtime/syntax/puppet.yaml +22 -0
  175. package/runtime/syntax/python2.yaml +60 -0
  176. package/runtime/syntax/python3.yaml +80 -0
  177. package/runtime/syntax/r.yaml +32 -0
  178. package/runtime/syntax/raku.yaml +42 -0
  179. package/runtime/syntax/reST.yaml +18 -0
  180. package/runtime/syntax/renpy.yaml +15 -0
  181. package/runtime/syntax/rpmspec.yaml +43 -0
  182. package/runtime/syntax/ruby.yaml +73 -0
  183. package/runtime/syntax/rust.yaml +78 -0
  184. package/runtime/syntax/sage.yaml +60 -0
  185. package/runtime/syntax/scad.yaml +53 -0
  186. package/runtime/syntax/scala.yaml +33 -0
  187. package/runtime/syntax/sed.yaml +13 -0
  188. package/runtime/syntax/sh.yaml +69 -0
  189. package/runtime/syntax/sls.yaml +15 -0
  190. package/runtime/syntax/smalltalk.yaml +55 -0
  191. package/runtime/syntax/solidity.yaml +41 -0
  192. package/runtime/syntax/sql.yaml +35 -0
  193. package/runtime/syntax/stata.yaml +67 -0
  194. package/runtime/syntax/svelte.yaml +27 -0
  195. package/runtime/syntax/swift.yaml +103 -0
  196. package/runtime/syntax/systemd.yaml +16 -0
  197. package/runtime/syntax/tcl.yaml +18 -0
  198. package/runtime/syntax/terraform.yaml +87 -0
  199. package/runtime/syntax/tex.yaml +32 -0
  200. package/runtime/syntax/toml.yaml +56 -0
  201. package/runtime/syntax/twig.yaml +55 -0
  202. package/runtime/syntax/typescript.yaml +49 -0
  203. package/runtime/syntax/v.yaml +80 -0
  204. package/runtime/syntax/vala.yaml +26 -0
  205. package/runtime/syntax/verilog.yaml +60 -0
  206. package/runtime/syntax/vhdl.yaml +37 -0
  207. package/runtime/syntax/vi.yaml +31 -0
  208. package/runtime/syntax/vue.yaml +64 -0
  209. package/runtime/syntax/xml.yaml +37 -0
  210. package/runtime/syntax/xresources.yaml +14 -0
  211. package/runtime/syntax/yaml.yaml +34 -0
  212. package/runtime/syntax/yum.yaml +12 -0
  213. package/runtime/syntax/zig.yaml +52 -0
  214. package/runtime/syntax/zscript.yaml +72 -0
  215. package/runtime/syntax/zsh.yaml +52 -0
  216. package/single-exe/README.md +80 -0
  217. package/single-exe/assetsHelper.js +90 -0
  218. package/single-exe/assetsLoader.mjs +85 -0
  219. package/single-exe/compiled.js +149 -0
  220. package/single-exe/entry.mjs +9 -0
  221. package/single-exe/packAssets.sh +7 -0
  222. package/src/buffer/backup.js +160 -0
  223. package/src/buffer/buffer.js +126 -0
  224. package/src/buffer/fixed3-codec.js +140 -0
  225. package/src/buffer/loc.js +38 -0
  226. package/src/buffer/message.js +29 -0
  227. package/src/config/clean.js +172 -0
  228. package/src/config/colorscheme.js +99 -0
  229. package/src/config/config.js +122 -0
  230. package/src/config/defaults.js +109 -0
  231. package/src/cui/rpc.mjs +259 -0
  232. package/src/cui/server.mjs +116 -0
  233. package/src/display/ansi-style.js +60 -0
  234. package/src/highlight/highlighter.js +243 -0
  235. package/src/highlight/parser.js +225 -0
  236. package/src/index.js +8009 -0
  237. package/src/lua/engine.js +71 -0
  238. package/src/platform/archive.js +50 -0
  239. package/src/platform/clipboard.js +278 -0
  240. package/src/platform/commands.js +137 -0
  241. package/src/plugins/js-bridge.js +983 -0
  242. package/src/plugins/manager.js +674 -0
  243. package/src/runtime/assets.js +90 -0
  244. package/src/runtime/compiled.js +25 -0
  245. package/src/runtime/encodings.js +10 -0
  246. package/src/runtime/registry.js +134 -0
  247. package/src/screen/cell-buffer.js +81 -0
  248. package/src/screen/events.js +263 -0
  249. package/src/screen/screen.js +142 -0
  250. package/src/screen/vt100.js +571 -0
  251. package/src/shell/shell.js +70 -0
  252. package/testapp.md +55 -0
  253. package/tests/backup.test.js +133 -0
  254. package/tests/cmphex3b64.js +95 -0
  255. package/tests/pty-demo.js +492 -0
  256. package/tests/wv-client.js +96 -0
  257. package/tui +5 -0
  258. package/wui +5 -0
@@ -0,0 +1,14 @@
1
+ filetype: privoxy-action
2
+
3
+ detect:
4
+ filename: "\\.action$"
5
+
6
+ rules:
7
+ - constant.bool.false: "[{[:space:]]\\-block([[:space:]{}]|$)"
8
+ - constant.bool.true: "[{[:space:]]\\+block([[:space:]{}]|$)"
9
+ - constant.bool.false: "-(add-header|change-x-forwarded-for|client-header-filter|client-header-tagger|content-type-overwrite|crunch-client-header|crunch-if-none-match|crunch-incoming-cookies|crunch-outgoing-cookies|crunch-server-header|deanimate-gifs|downgrade-http-version|fast-redirects|filter|force-text-mode|forward-override|handle-as-empty-document|handle-as-image|hide-accept-language|hide-content-disposition|hide-from-header|hide-if-modified-since|hide-referrer|hide-user-agent|limit-connect|overwrite-last-modified|prevent-compression|redirect|server-header-filter|server-header-tagger|session-cookies-only|set-image-blocker)"
10
+ - constant.bool.true: "\\+(add-header|change-x-forwarded-for|client-header-filter|client-header-tagger|content-type-overwrite|crunch-client-header|crunch-if-none-match|crunch-incoming-cookies|crunch-outgoing-cookies|crunch-server-header|deanimate-gifs|downgrade-http-version|fast-redirects|filter|force-text-mode|forward-override|handle-as-empty-document|handle-as-image|hide-accept-language|hide-content-disposition|hide-from-header|hide-if-modified-since|hide-referrer|hide-user-agent|limit-connect|overwrite-last-modified|prevent-compression|redirect|server-header-filter|server-header-tagger|session-cookies-only|set-image-blocker)"
11
+ - constant.specialChar: "\\\\.?"
12
+ - comment: "(^|[[:space:]])#([^{].*)?$"
13
+ - indent-char.whitespace: "[[:space:]]+$"
14
+ - indent-char: " + +| + +"
@@ -0,0 +1,10 @@
1
+ filetype: privoxy-config
2
+
3
+ detect:
4
+ filename: "privoxy/config$"
5
+
6
+ rules:
7
+ - statement: "(accept-intercepted-requests|actionsfile|admin-address|allow-cgi-request-crunching|buffer-limit|compression-level|confdir|connection-sharing|debug|default-server-timeout|deny-access|enable-compression|enable-edit-actions|enable-remote-http-toggle|enable-remote-toggle|enforce-blocks|filterfile|forward|forwarded-connect-retries|forward-socks4|forward-socks4a|forward-socks5|handle-as-empty-doc-returns-ok|hostname|keep-alive-timeout|listen-address|logdir|logfile|max-client-connections|permit-access|proxy-info-url|single-threaded|socket-timeout|split-large-forms|templdir|toggle|tolerate-pipelining|trustfile|trust-info-url|user-manual)[[:space:]]"
8
+ - comment: "(^|[[:space:]])#([^{].*)?$"
9
+ - indent-char.whitespace: "[[:space:]]+$"
10
+ - indent-char: " + +| + +"
@@ -0,0 +1,12 @@
1
+ filetype: privoxy-filter
2
+
3
+ detect:
4
+ filename: "\\.filter$"
5
+
6
+ rules:
7
+ - statement: "^(FILTER|CLIENT-HEADER-FILTER|CLIENT-HEADER-TAGGER|SERVER-HEADER-FILTER|SERVER-HEADER-TAGGER): [a-z-]+"
8
+ - identifier: "^(FILTER|CLIENT-HEADER-FILTER|CLIENT-HEADER-TAGGER|SERVER-HEADER-FILTER|SERVER-HEADER-TAGGER):"
9
+ - constant.specialChar: "\\\\.?"
10
+ - comment: "(^|[[:space:]])#([^{].*)?$"
11
+ - indent-char.whitespace: "[[:space:]]+$"
12
+ - indent-char: " + +| + +"
@@ -0,0 +1,40 @@
1
+ filetype: proto
2
+
3
+ detect:
4
+ filename: "(\\.(proto)$$)"
5
+
6
+ rules:
7
+ - identifier: "\\b[A-Z_][0-9A-Z_]+\\b"
8
+ - type: "\\b(int(8|16|32|64))|string|bytes|repeated|bool|required|map|optional|oneof|union\\b"
9
+ - statement: "\\b(import|service|enum|syntax|package|option|message|rpc|returns|extensions|to)\\b"
10
+ - constant: "'\\\\(([0-3]?[0-7]{1,2}))'"
11
+ - constant: "'\\\\x[0-9A-Fa-f]{1,2}'"
12
+ - symbol.brackets: "[(){}]|\\[|\\]"
13
+ - constant.number: "(\\b[0-9]+\\b|\\b0x[0-9A-Fa-f]+\\b)"
14
+
15
+ - constant.string:
16
+ start: "\""
17
+ end: "\""
18
+ skip: "\\\\."
19
+ rules:
20
+ - constant.specialChar: "\\\\."
21
+
22
+ - constant.string:
23
+ start: "'"
24
+ end: "'"
25
+ skip: "\\\\."
26
+ rules:
27
+ - preproc: "..+"
28
+ - constant.specialChar: "\\\\."
29
+
30
+ - comment:
31
+ start: "//"
32
+ end: "$"
33
+ rules:
34
+ - todo: "(TODO|XXX|FIXME):?"
35
+
36
+ - comment:
37
+ start: "/\\*"
38
+ end: "\\*/"
39
+ rules:
40
+ - todo: "(TODO|XXX|FIXME):?"
@@ -0,0 +1,84 @@
1
+ # https://prql-lang.org/
2
+ # https://github.com/PRQL/prql
3
+ filetype: prql
4
+
5
+ detect:
6
+ filename: "\\.prql$"
7
+
8
+ rules:
9
+ - statement: "\\b(let|module|into|case|type|func)\\b"
10
+
11
+ # Types
12
+ - type: "\\b(u?int(8|16|32|64)?|float(32|64)|bool|text|date|time|timestamp)\\b"
13
+ - type.keyword: "\\b(enum)\\b"
14
+ - constant.bool: "\\b(true|false|null|this|that)\\b"
15
+
16
+ # Built-in functions
17
+ - identifier: "\\b(abs|floor|ceil|pi|exp|ln|log10|log|sqrt|degrees|radians|cos|acos|sin|asin|tan|atan|pow|round)\\b" # Math module
18
+ - identifier: "\\b(min|max|sum|average|stddev|all|any|concat_array|count)\\b" # Aggregate functions
19
+ - identifier: "\\b(lag|lead|first|last|rank|rank_dense|row_number)\\b" # Window functions
20
+ - identifier: "\\b(tuple_every|tuple_map|tuple_zip|_eq|_is_null)\\b" # Tuple functions
21
+ - identifier: "\\b(as|in|from_text)\\b" # Misc
22
+ - identifier: "\\b(lower|upper|ltrim|rtrim|trim|length|extract|replace|starts_with|contains|ends_with)\\b" # Text module
23
+ - identifier: "\\b(to_text)\\b" # Date module
24
+ - identifier: "\\b(read_parquet|read_csv)\\b" # File-reading functions
25
+
26
+ # Modules
27
+ - identifier.class: "\\b(math|text|date|prql)\\b"
28
+
29
+ # Transforms
30
+ - statement: "\\b(aggregate|derive|filter|from|group|join|select|sort|take|window)\\b"
31
+
32
+ # Operators
33
+ - symbol.operator: "([~^.:;,+*|=!\\%@?]|<|>|/|-|&)"
34
+
35
+ # Brackets
36
+ - symbol.brackets: "[{}()\\[\\]]"
37
+
38
+ # Numbers
39
+ - constant.number: "\\b[0-9](_?[0-9])*(\\.([0-9](_?[0-9])*)?)?(e[0-9](_?[0-9])*)?\\b" # decimal
40
+ - constant.number: "\\b0b(_?[01])+\\b" # bin
41
+ - constant.number: "\\b0o(_?[0-7])+\\b" # oct
42
+ - constant.number: "\\b0x(_?[0-9a-fA-F])+\\b" # hex
43
+ - constant: "\\b[0-9]+(years|months|weeks|days|hours|minutes|seconds|milliseconds|microseconds)\\b"
44
+
45
+ - constant.string:
46
+ start: "[frs]?\"\"\""
47
+ end: "\"\"\""
48
+ skip: "\\\\."
49
+ rules:
50
+ - constant.specialChar: "\\\\[bfnrt'\"\\\\]"
51
+ - constant.specialChar: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u\\{[0-9A-Fa-f]{1,6}\\})"
52
+
53
+ - constant.string:
54
+ start: "[frs]?'''"
55
+ end: "'''"
56
+ skip: "\\\\."
57
+ rules:
58
+ - constant.specialChar: "\\\\[bfnrt'\"\\\\]"
59
+ - constant.specialChar: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u\\{[0-9A-Fa-f]{1,6}\\})"
60
+
61
+ - constant.string:
62
+ start: "[frs]?\""
63
+ end: "\""
64
+ skip: "\\\\."
65
+ rules:
66
+ - constant.specialChar: "\\\\[bfnrt'\"\\\\]"
67
+ - constant.specialChar: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u\\{[0-9A-Fa-f]{1,6}\\})"
68
+
69
+ - constant.string:
70
+ start: "[frs]?'"
71
+ end: "'"
72
+ skip: "\\\\."
73
+ rules:
74
+ - constant.specialChar: "\\\\[bfnrt'\"\\\\]"
75
+ - constant.specialChar: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u\\{[0-9A-Fa-f]{1,6}\\})"
76
+
77
+ - comment:
78
+ start: "#"
79
+ end: "$"
80
+ rules:
81
+ - todo: "(TODO|FIXME|NOTE):?"
82
+
83
+ # Decorators
84
+ - preproc: "@\\{([a-z]+(=[a-z0-9]+,?)?)*\\}"
@@ -0,0 +1,22 @@
1
+ filetype: puppet
2
+
3
+ detect:
4
+ filename: "\\.pp$"
5
+
6
+ rules:
7
+ - default: "^[[:space:]]([a-z][a-z0-9_]+)"
8
+ - identifier.var: "\\$[a-z:][a-z0-9_:]+"
9
+ - type: "\\b(augeas|computer|cron|exec|file|filebucket|group|host|interface|k5login|macauthorization|mailalias|maillist|mcx|mount|nagios_command|nagios_contact|nagios_contactgroup|nagios_host|nagios_hostdependency|nagios_hostescalation|nagios_hostextinfo|nagios_hostgroup|nagios_service|nagios_servicedependency|nagios_serviceescalation|nagios_serviceextinfo|nagios_servicegroup|nagios_timeperiod|notify|package|resources|router|schedule|scheduled_task|selboolean|selmodule|service|ssh_authorized_key|sshkey|stage|tidy|user|vlan|yumrepo|zfs|zone|zpool|anchor)\\b"
10
+ - statement: "\\b(class|define|if|else|undef|inherits)\\b"
11
+ - symbol: "(=|-|~|>)"
12
+ - identifier.var: "(\\$|@|@@)?\\b[A-Z]+[0-9A-Z_a-z]*"
13
+ - symbol: "([ ]|^):[0-9A-Z_]+\\b"
14
+ - constant: "/([^/]|(\\\\/))*/[iomx]*|%r\\{([^}]|(\\\\}))*\\}[iomx]*"
15
+ - constant.string: "`[^`]*`|%x\\{[^}]*\\}"
16
+ - constant.string: "\"([^\"]|(\\\\\"))*\"|%[QW]?\\{[^}]*\\}|%[QW]?\\([^)]*\\)|%[QW]?<[^>]*>|%[QW]?\\[[^]]*\\]|%[QW]?\\$[^$]*\\$|%[QW]?\\^[^^]*\\^|%[QW]?![^!]*!"
17
+ - special: "\\$\\{[^}]*\\}"
18
+ - constant.string: "'([^']|(\\\\'))*'|%[qw]\\{[^}]*\\}|%[qw]\\([^)]*\\)|%[qw]<[^>]*>|%[qw]\\[[^]]*\\]|%[qw]\\$[^$]*\\$|%[qw]\\^[^^]*\\^|%[qw]![^!]*!"
19
+ - comment: "#[^{].*$|#$"
20
+ - comment.bright: "##[^{].*$|##$"
21
+ - todo: "(XXX|TODO|FIXME|\\?\\?\\?)"
22
+ - indent-char.whitespace: "[[:space:]]+$"
@@ -0,0 +1,60 @@
1
+ filetype: python2
2
+
3
+ detect:
4
+ filename: "\\.py2$"
5
+ header: "^#!.*/(env +)?python2$"
6
+
7
+ rules:
8
+
9
+ # built-in objects
10
+ - constant: "\\b(None|self|True|False)\\b"
11
+ # built-in attributes
12
+ - constant: "\\b(__bases__|__builtin__|__class__|__debug__|__dict__|__doc__|__file__|__members__|__methods__|__name__|__self__)\\b"
13
+ # built-in functions
14
+ - identifier: "\\b(abs|apply|callable|chr|cmp|compile|delattr|dir|divmod|eval|exec|execfile|filter|format|getattr|globals|hasattr|hash|help|hex|id|input|intern|isinstance|issubclass|len|locals|max|min|next|oct|open|ord|pow|range|raw_input|reduce|reload|repr|round|setattr|unichr|vars|zip|__import__)\\b"
15
+ # special method names
16
+ - identifier: "\\b(__abs__|__add__|__and__|__call__|__cmp__|__coerce__|__complex__|__concat__|__contains__|__del__|__delattr__|__delitem__|__dict__|__delslice__|__div__|__divmod__|__float__|__getattr__|__getitem__|__getslice__|__hash__|__hex__|__init__|__int__|__inv__|__invert__|__len__|__long__|__lshift__|__mod__|__mul__|__neg__|__nonzero__|__oct__|__or__|__pos__|__pow__|__radd__|__rand__|__rcmp__|__rdiv__|__rdivmod__|__repeat__|__repr__|__rlshift__|__rmod__|__rmul__|__ror__|__rpow__|__rrshift__|__rshift__|__rsub__|__rxor__|__setattr__|__setitem__|__setslice__|__str__|__sub__|__xor__)\\b"
17
+ # types
18
+ - type: "\\b(basestring|bool|buffer|bytearray|bytes|classmethod|complex|dict|enumerate|file|float|frozenset|int|list|long|map|memoryview|object|property|reversed|set|slice|staticmethod|str|super|tuple|type|unicode|xrange)\\b"
19
+ # definitions
20
+ - identifier: "def [a-zA-Z_0-9]+"
21
+ # keywords
22
+ - statement: "\\b(and|as|assert|break|class|continue|def|del|elif|else|except|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield)\\b"
23
+ # decorators
24
+ - preproc: "^\\s*@[^(]*"
25
+ # operators
26
+ - symbol.operator: "([.:;,+*|=!\\%@]|<|>|/|-|&)"
27
+ # parentheses
28
+ - symbol.brackets: "([(){}]|\\[|\\])"
29
+ # numbers
30
+ - constant.number: "\\b[0-9]+\\b"
31
+
32
+ - constant.string:
33
+ start: "\"\"\""
34
+ end: "\"\"\""
35
+ rules: []
36
+
37
+ - constant.string:
38
+ start: "'''"
39
+ end: "'''"
40
+ rules: []
41
+
42
+ - constant.string:
43
+ start: "\""
44
+ end: "\""
45
+ skip: "\\\\."
46
+ rules:
47
+ - constant.specialChar: "\\\\."
48
+
49
+ - constant.string:
50
+ start: "'"
51
+ end: "'"
52
+ skip: "\\\\."
53
+ rules:
54
+ - constant.specialChar: "\\\\."
55
+
56
+ - comment:
57
+ start: "#"
58
+ end: "$"
59
+ rules: []
60
+
@@ -0,0 +1,80 @@
1
+ filetype: python
2
+
3
+ detect:
4
+ filename: "\\.py(3|w)?$"
5
+ header: "^#!.*/(env +)?python(3)?$"
6
+
7
+ rules:
8
+ # built-in objects
9
+ - constant: "\\b(Ellipsis|None|self|cls|True|False)\\b"
10
+ # built-in attributes
11
+ - constant: "\\b(__bases__|__builtin__|__class__|__debug__|__dict__|__doc__|__file__|__members__|__methods__|__name__|__self__)\\b"
12
+ # built-in functions
13
+ - identifier: "\\b(abs|all|any|ascii|bin|bool|breakpoint|bytearray|bytes|callable|chr|classmethod|compile|complex|delattr|dir|divmod|eval|exec|format|getattr|globals|hasattr|hash|help|hex|id|input|isinstance|issubclass|iter|len|locals|max|min|next|nonlocal|oct|open|ord|pow|print|repr|round|setattr|sorted|sum|vars|__import__)\\b"
14
+ # special method names
15
+ - identifier: "\\b__(abs|add|and|call|cmp|coerce|complex|concat|contains|delattr|delitem|delslice|del|dict|divmod|div|float|getattr|getitem|getslice|hash|hex|iadd|iand|iconcat|ifloordiv|ilshift|imatmul|imod|imul|init|int|invert|inv|ior|ipow|irshift|isub|iter|itruediv|ixor|len|long|lshift|mod|mul|neg|next|nonzero|oct|or|pos|pow|radd|rand|rcmp|rdivmod|rdiv|repeat|repr|rlshift|rmod|rmul|ror|rpow|rrshift|rshift|rsub|rxor|setattr|setitem|setslice|str|sub|xor)__\\b"
16
+ # types
17
+ - type: "\\b(bool|bytearray|bytes|classmethod|complex|dict|enumerate|filter|float|frozenset|int|list|map|memoryview|object|property|range|reversed|set|slice|staticmethod|str|super|tuple|type|zip)\\b"
18
+ # definitions
19
+ - identifier: "def [a-zA-Z_0-9]+"
20
+ # keywords
21
+ - statement: "\\b(and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|raise|return|try|while|with|yield)\\b"
22
+ # decorators
23
+ - preproc: "^\\s*@[^(]*"
24
+ # operators
25
+ - symbol.operator: "([~^.:;,+*|=!\\%@]|<|>|/|-|&)"
26
+ # parentheses
27
+ - symbol.brackets: "([(){}]|\\[|\\])"
28
+ # numbers
29
+ - constant.number: "\\b[0-9](_?[0-9])*(\\.([0-9](_?[0-9])*)?)?(e[0-9](_?[0-9])*)?\\b" # decimal
30
+ - constant.number: "\\b0b(_?[01])+\\b" # bin
31
+ - constant.number: "\\b0o(_?[0-7])+\\b" # oct
32
+ - constant.number: "\\b0x(_?[0-9a-fA-F])+\\b" # hex
33
+
34
+ - constant.string:
35
+ start: "\"\"\""
36
+ end: "\"\"\""
37
+ rules: []
38
+
39
+ - constant.string:
40
+ start: "'''"
41
+ end: "'''"
42
+ rules: []
43
+
44
+ - constant.string:
45
+ start: "\""
46
+ end: "(\"|$)"
47
+ skip: "\\\\."
48
+ rules:
49
+ - constant.specialChar: "\\\\."
50
+
51
+ - constant.string:
52
+ start: "'"
53
+ end: "('|$)"
54
+ skip: "\\\\."
55
+ rules:
56
+ - constant.specialChar: "\\\\."
57
+
58
+ - comment:
59
+ start: "#"
60
+ end: "$"
61
+ rules: # AKA Code tags (PEP 350)
62
+ - todo: "(TODO|FIXME|HACK|BUG|NOTE|FAQ|MNEMONIC|REQ|RFE|IDEA|PORT|\\?\\?\\?|!!!|GLOSS|SEE|TODOC|STAT|RVD|CRED):?"
63
+
64
+ # autocomplete-reference: Python built-in constants, functions, and types (Python docs)
65
+ # None True False Ellipsis NotImplemented __debug__ abs aiter all anext any ascii bin bool breakpoint bytearray bytes callable chr classmethod compile complex delattr dict dir divmod enumerate eval exec filter float format frozenset getattr globals hasattr hash help hex id input int isinstance issubclass iter len list locals map max memoryview min next object oct open ord pow print property range repr reversed round set setattr slice sorted staticmethod str sum super tuple type vars zip __import__
66
+ # ArithmeticError AssertionError AttributeError BaseException BaseExceptionGroup BlockingIOError BrokenPipeError BufferError BytesWarning ChildProcessError ConnectionAbortedError ConnectionError ConnectionRefusedError ConnectionResetError DeprecationWarning EOFError EncodingWarning EnvironmentError Exception ExceptionGroup FileExistsError FileNotFoundError FloatingPointError FutureWarning GeneratorExit IOError ImportError ImportWarning IndentationError IndexError InterruptedError IsADirectoryError KeyError KeyboardInterrupt LookupError MemoryError ModuleNotFoundError NameError NotADirectoryError NotImplementedError OSError OverflowError PendingDeprecationWarning PermissionError ProcessLookupError RecursionError ReferenceError ResourceWarning RuntimeError RuntimeWarning StopAsyncIteration StopIteration SyntaxError SyntaxWarning SystemError SystemExit TabError TimeoutError TypeError UnboundLocalError UnicodeDecodeError UnicodeEncodeError UnicodeError UnicodeTranslateError UnicodeWarning UserWarning ValueError Warning ZeroDivisionError
67
+ # autocomplete-reference: Python common object and data model methods
68
+ # __abs__ __add__ __aiter__ __all__ __and__ __annotations__ __anext__ __await__ __bases__ __bool__ __buffer__ __builtins__ __bytes__ __cached__ __call__ __ceil__ __class__ __class_getitem__ __closure__ __code__ __complex__ __contains__ __context__ __debug__ __defaults__ __del__ __delattr__ __delete__ __delitem__ __dict__ __dir__ __divmod__ __doc__ __enter__ __eq__ __exit__ __file__ __float__ __floor__ __floordiv__ __format__ __fspath__ __ge__ __get__ __getattr__ __getattribute__ __getitem__ __getnewargs__ __getstate__ __globals__ __gt__ __hash__ __iadd__ __iand__ __ifloordiv__ __ilshift__ __imatmul__ __imod__ __imul__ __index__ __init__ __init_subclass__ __instancecheck__ __int__ __invert__ __ior__ __ipow__ __irshift__ __isub__ __iter__ __itruediv__ __ixor__ __kwdefaults__ __le__ __len__ __length_hint__ __loader__ __lshift__ __lt__ __matmul__ __missing__ __mod__ __module__ __mro__ __mul__ __name__ __ne__ __neg__ __new__ __next__ __or__ __package__ __path__ __pos__ __pow__ __qualname__ __radd__ __rand__ __rdivmod__ __reduce__ __reduce_ex__ __repr__ __reversed__ __rfloordiv__ __rlshift__ __rmatmul__ __rmod__ __rmul__ __ror__ __round__ __rpow__ __rrshift__ __rshift__ __rsub__ __rtruediv__ __rxor__ __set__ __set_name__ __setattr__ __setitem__ __slots__ __spec__ __str__ __sub__ __subclasscheck__ __subclasses__ __traceback__ __truediv__ __trunc__ __weakref__ __xor__
69
+ # autocomplete-reference: Python str, bytes, list, tuple, dict, set, file/path methods
70
+ # capitalize casefold center count encode endswith expandtabs find format format_map index isalnum isalpha isascii isdecimal isdigit isidentifier islower isnumeric isprintable isspace istitle isupper join ljust lower lstrip maketrans partition removeprefix removesuffix replace rfind rindex rjust rpartition rsplit rstrip split splitlines startswith strip swapcase title translate upper zfill
71
+ # append clear copy count extend index insert pop remove reverse sort
72
+ # clear copy fromkeys get items keys pop popitem setdefault update values
73
+ # add clear copy difference difference_update discard intersection intersection_update isdisjoint issubset issuperset pop remove symmetric_difference symmetric_difference_update union update
74
+ # close closed detach fileno flush isatty read readable readline readlines seek seekable tell truncate writable write writelines exists is_file is_dir iterdir glob rglob mkdir rename replace resolve absolute parent parents name stem suffix suffixes with_name with_stem with_suffix open read_text read_bytes write_text write_bytes
75
+ # autocomplete-reference: Python standard-library module names (Python module index)
76
+ # abc aifc argparse array ast asyncio atexit audioop base64 bdb binascii bisect builtins bz2 calendar cgi cgitb chunk cmath cmd code codecs codeop collections colorsys compileall concurrent configparser contextlib contextvars copy copyreg crypt csv ctypes curses dataclasses datetime dbm decimal difflib dis doctest email encodings ensurepip enum errno faulthandler fcntl filecmp fileinput fnmatch fractions ftplib functools gc getopt getpass gettext glob graphlib grp gzip hashlib heapq hmac html http idlelib imaplib imghdr importlib inspect io ipaddress itertools json keyword linecache locale logging lzma mailbox mailcap marshal math mimetypes mmap modulefinder multiprocessing netrc nis nntplib numbers operator optparse os pathlib pdb pickle pickletools pipes pkgutil platform plistlib poplib posix pprint profile pstats pty pwd py_compile pyclbr pydoc queue quopri random re readline reprlib resource rlcompleter runpy sched secrets select selectors shelve shlex shutil signal site smtpd smtplib sndhdr socket socketserver sqlite3 ssl stat statistics string stringprep struct subprocess sunau symtable sys sysconfig syslog tabnanny tarfile telnetlib tempfile termios textwrap threading time timeit tkinter token tokenize tomllib trace traceback tracemalloc tty turtle types typing unicodedata unittest urllib uuid venv warnings wave weakref webbrowser wsgiref xdrlib xml xmlrpc zipapp zipfile zipimport zlib zoneinfo
77
+ # autocomplete-reference: famous third-party Python packages and common aliases
78
+ # numpy np pandas pd scipy sklearn scikit_learn matplotlib plt seaborn sns plotly bokeh altair statsmodels sympy numba cython polars pyarrow dask xarray networkx requests httpx aiohttp urllib3 beautifulsoup4 bs4 lxml scrapy selenium playwright flask django fastapi starlette pydantic sqlalchemy alembic psycopg2 pymongo redis celery typer click rich textual tqdm pytest hypothesis tox nox black ruff flake8 mypy pyright isort poetry pip setuptools wheel virtualenv ipython jupyter notebook jupyterlab ipykernel ipywidgets traitlets pillow PIL opencv cv2 imageio skimage scikit_image torch torchvision torchaudio tensorflow keras jax flax transformers tokenizers datasets accelerate diffusers sentence_transformers spacy nltk gensim langchain openai anthropic google genai boto3 botocore s3fs fsspec cryptography paramiko fabric pendulum arrow dateutil pyyaml yaml toml tomli tomlkit orjson ujson msgpack pydantic_settings python_dotenv dotenv sqlalchemy_utils flask_sqlalchemy django_rest_framework drf pytest_asyncio pytest_cov coverage
79
+ # autocomplete-reference: common package submodules and method words
80
+ # ndarray array arange linspace zeros ones empty full eye reshape transpose astype dtype shape ndim size mean median std var sum min max argmin argmax argsort sort clip concatenate stack hstack vstack dot matmul einsum where unique random DataFrame Series read_csv read_excel read_json read_parquet read_sql to_csv to_excel to_json to_parquet groupby merge join concat pivot pivot_table drop dropna fillna assign apply map iloc loc values columns index describe head tail info query sort_values reset_index set_index fit transform fit_transform predict predict_proba score train_test_split Pipeline GridSearchCV StandardScaler OneHotEncoder RandomForestClassifier RandomForestRegressor LinearRegression LogisticRegression
@@ -0,0 +1,32 @@
1
+ filetype: r
2
+
3
+ detect:
4
+ filename: "\\.(r|R)$"
5
+
6
+ rules:
7
+
8
+ - statement: "\\b(library|require|break|else|for|function|if|ifelse|in|next|names|switch|repeat|print|try|tryCatch|isTRUE|return|while)\\b"
9
+ - constant: "\\b(T|TRUE|F|FALSE|NULL|Inf|NaN|NA|NA_integer_|NA_real_|NA_complex_|NA_character_)\\b"
10
+ - constant.number: "(\\b[0-9]+\\b|\\b0x[0-9A-Fa-f]+\\b)"
11
+ - symbol.operator: "([.:;,+*|=!\\%]|<|>|/|-|&|\\^|\\$)"
12
+
13
+ - comment:
14
+ start: "#"
15
+ end: "$"
16
+ rules:
17
+ - todo: "(TODO|XXX|FIXME):?"
18
+
19
+ - constant.string:
20
+ start: "\""
21
+ end: "\""
22
+ skip: "\\\\."
23
+ rules:
24
+ - constant.specialChar: "\\\\."
25
+
26
+ - constant.string:
27
+ start: "'"
28
+ end: "'"
29
+ skip: "\\\\."
30
+ rules:
31
+ - constant.specialChar: "\\\\."
32
+
@@ -0,0 +1,42 @@
1
+ filetype: raku
2
+
3
+ detect:
4
+ filename: "\\.(p(l|m|od)?6|raku(mod|doc|test)?|nqp)$"
5
+
6
+ rules:
7
+ - type: "\\b(accept|alarm|atan2|bin(d|mode)|c(aller|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)|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|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|do|name|quire|set|turn|verse|winddir)|rindex|rmdir|s|scalar|seek|seekdir|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|un(def|link|pack|shift)|utime|values|vec|wait(pid)?|wantarray|warn|write)\\b"
8
+ - 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"
9
+ - special: "\\b(has|is|class|role|given|when|BUILD|multi|returns|method|submethod|slurp|say|sub)\\b"
10
+
11
+ - identifier: "[$@%&](\\.|!|\\^)?([[:alpha:]]|_)"
12
+ - identifier: "[$@%&](\\.|!|^)?([[:alpha:]]|_)([[:alnum:]]|-|_)*([[:alnum:]]|_)"
13
+ - identifier: "[$@%&](\\?|\\*)([A-Z])([A-Z]|-)*([A-Z])"
14
+
15
+ - constant.string:
16
+ start: "\""
17
+ end: "\""
18
+ skip: "\\\\."
19
+ rules:
20
+ - constant.specialChar: "\\\\."
21
+
22
+ - constant.string:
23
+ start: "'"
24
+ end: "'"
25
+ skip: "\\\\."
26
+ rules:
27
+ - constant.specialChar: "\\\\."
28
+
29
+ - preproc:
30
+ start: "(^use| = new)"
31
+ end: ";"
32
+ rules: []
33
+
34
+ - identifier.macro:
35
+ start: "<<EOSQL"
36
+ end: "EOSQL"
37
+ rules: []
38
+
39
+ - comment:
40
+ start: "#"
41
+ end: "$"
42
+ rules: []
@@ -0,0 +1,18 @@
1
+ filetype: rst
2
+
3
+ detect:
4
+ filename: "\\.rest$|\\.rst$"
5
+
6
+ rules:
7
+ - statement: "\\*\\*[^*]+\\*\\*"
8
+ - preproc: "::"
9
+ - constant.string: "`[^`]+`_{1,2}"
10
+ - constant.string: "``[^`]+``"
11
+ - identifier: "^\\.\\. .*$"
12
+ - identifier: "^__ .*$"
13
+ - type: "^###+$"
14
+ - type: "^\\*\\*\\*+$"
15
+ - special: "^===+$"
16
+ - special: "^---+$"
17
+ - special: "^\\^\\^\\^+$"
18
+ - special: "^\"\"\"+$"
@@ -0,0 +1,15 @@
1
+ filetype: renpy
2
+
3
+ detect:
4
+ filename: "\\.rpy$"
5
+
6
+ rules:
7
+ # Script language keywords.
8
+ - statement: "\\b(python|init|early|define|default|label|call|jump|image|layeredimage|screen|style|transform|menu|show|hide|scene|at|with|zorder|behind|pause|play|stop|fadeout|fadein|queue)\\b"
9
+ # ATL keywords.
10
+ - type: "\\b(repeat|block|choice|parallel|(x|y|)(pos|offset|anchor|align|center|tile|zoom)|time|linear|easein|alpha|subpixel)\\b"
11
+ - identifier: "\\bpersistent\\b"
12
+ - special: "\\$ "
13
+ # Tab characters are not allowed in Renpy scripts.
14
+ - error: "\\t"
15
+ - include: python
@@ -0,0 +1,43 @@
1
+ filetype: rpmspec
2
+
3
+ detect:
4
+ filename: "\\.spec$|\\.rpmspec$"
5
+
6
+ rules:
7
+ - preproc: "\\b(Icon|ExclusiveOs|ExcludeOs):"
8
+ - preproc: "\\b(BuildArch|BuildArchitectures|ExclusiveArch|ExcludeArch):"
9
+ - preproc: "\\b(Conflicts|Obsoletes|Provides|Requires|Requires\\(.*\\)|Enhances|Suggests|BuildConflicts|BuildRequires|Recommends|PreReq|Supplements):"
10
+ - preproc: "\\b(Epoch|Serial|Nosource|Nopatch):"
11
+ - preproc: "\\b(AutoReq|AutoProv|AutoReqProv):"
12
+ - preproc: "\\b(Copyright|License|Summary|Summary\\(.*\\)|Distribution|Vendor|Packager|Group|Source[0-9]*|Patch[0-9]*|BuildRoot|Prefix):"
13
+ - preproc: "\\b(Name|Version|Release|Url|URL):"
14
+ - preproc:
15
+ start: "^(Source|Patch)"
16
+ end: ":"
17
+ rules: []
18
+
19
+ - preproc: "(i386|i486|i586|i686|athlon|ia64|alpha|alphaev5|alphaev56|alphapca56|alphaev6|alphaev67|sparc|sparcv9|sparc64armv3l|armv4b|armv4lm|ips|mipsel|ppc|ppc|iseries|ppcpseries|ppc64|m68k|m68kmint|Sgi|rs6000|i370|s390x|s390|noarch)"
20
+ - preproc: "(ifarch|ifnarch|ifos|ifnos)"
21
+ - constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
22
+ - statement: "%(if|else|endif|define|global|undefine)"
23
+ - statement: "%_?([A-Z_a-z_0-9_]*)"
24
+ - statement:
25
+ start: "%\\{"
26
+ end: "\\}"
27
+ rules: []
28
+
29
+ - statement:
30
+ start: "%\\{__"
31
+ end: "\\}"
32
+ rules: []
33
+
34
+ - statement: "\\$(RPM_BUILD_ROOT)\\>"
35
+ - special: "^%(build$|changelog|check$|clean$|description)"
36
+ - special: "^%(files|install$|package|prep$)"
37
+ - special: "^%(pre|preun|pretrans|post|postun|posttrans)"
38
+ - special: "^%(trigger|triggerin|triggerpostun|triggerun|verifyscript)"
39
+ - comment: "(^|[[:space:]])#([^{].*)?$"
40
+ - constant: "^\\*.*$"
41
+ - indent-char.whitespace: "[[:space:]]+$"
42
+ - indent-char: " + +| + +"
43
+ - todo: "TODO:?"
@@ -0,0 +1,73 @@
1
+ filetype: ruby
2
+
3
+ detect:
4
+ filename: '\.(rb|rake|gemspec)$|^(.*[\\/])?(Gemfile|config\.ru|Rakefile|Capfile|Vagrantfile|Guardfile|Appfile|Fastfile|Pluginfile|Podfile|\.?[Bb]rewfile)$'
5
+ header: "^#!.*/(env +)?ruby( |$)"
6
+
7
+ rules:
8
+ - comment.bright:
9
+ start: "##"
10
+ end: "$"
11
+ rules:
12
+ - todo: "(XXX|TODO|FIXME|BUG|\\?\\?\\?)"
13
+ - comment:
14
+ start: "#"
15
+ end: "$"
16
+ rules:
17
+ - todo: "(XXX|TODO|FIXME|BUG|\\?\\?\\?)"
18
+
19
+ - statement: "\\b(BEGIN|END|alias|and|begin|break|case|class|def|defined\\?|do|else|elsif|end|ensure|for|if|in|module|next|nil|not|or|private|protected|public|redo|rescue|retry|return|self|super|then|undef|unless|until|when|while|yield)\\b"
20
+ - constant: "(\\$|@|@@)?\\b[A-Z]+[0-9A-Z_a-z]*"
21
+ - constant.number: "(?i)\\b0x[0-9a-fA-F][0-9a-f_]*\\b"
22
+ - constant.number: "(?i)\\b0b[01][01_]*\\b"
23
+ - constant.number: "(?i)\\b[0-9][0-9_]*(['.'][0-9_]+)?(e[\\-]?[0-9_]+)?\\b"
24
+ # Predefined global variables
25
+ - constant:
26
+ start: "[$]([!@&`'+~=/\\\\,;.<>*$?:\"_]|-[A-Za-z0-9_]|[0-9]+)"
27
+ end: "\\B|\\b"
28
+ rules: []
29
+ # Ruby "Symbols"
30
+ - constant: "(i?)([ ]|^):[0-9A-Z_]+\\b"
31
+ - constant: "\\b(__FILE__|__LINE__)\\b"
32
+ - constant: "/([^/]|(\\\\/))*/[iomx]*|%r\\{([^}]|(\\\\}))*\\}[iomx]*"
33
+
34
+ - constant.string:
35
+ start: "'"
36
+ end: "'"
37
+ skip: "\\\\."
38
+ rules: []
39
+
40
+ - constant.string:
41
+ start: "\""
42
+ end: "\""
43
+ skip: "\\\\."
44
+ rules:
45
+ - symbol.brackets:
46
+ start: "#\\{"
47
+ end: "\\}"
48
+ rules:
49
+ - default: ".*"
50
+
51
+ - constant.string.exec:
52
+ start: "`"
53
+ end: "`"
54
+ skip: "\\\\."
55
+ rules:
56
+ - symbol.brackets:
57
+ start: "#\\{"
58
+ end: "\\}"
59
+ rules:
60
+ - default: ".*"
61
+
62
+ - constant.string: "%[QW]?\\{[^}]*\\}|%[QW]?\\([^)]*\\)|%[QW]?<[^>]*>|%[QW]?\\[[^]]*\\]|%[QW]?\\$[^$]*\\$|%[QW]?\\^[^^]*\\^|%[QW]?![^!]*!"
63
+ - constant.string: "%[qw]\\{[^}]*\\}|%[qw]\\([^)]*\\)|%[qw]<[^>]*>|%[qw]\\[[^]]*\\]|%[qw]\\$[^$]*\\$|%[qw]\\^[^^]*\\^|%[qw]![^!]*!"
64
+ - constant.string.exec: "%[x]\\{[^}]*\\}|%[x]\\([^)]*\\)|%[x]<[^>]*>|%[x]\\[[^]]*\\]|%[x]\\$[^$]*\\$|%[x]\\^[^^]*\\^|%[x]![^!]*!"
65
+ - constant.bool: "\\b(true|false|nil|TRUE|FALSE|NIL)\\b"
66
+ - symbol.operator: "[-+/*=<>!~%&|^]|\\b:"
67
+ - symbol.brackets: "([(){}]|\\[|\\])"
68
+ - constant.macro:
69
+ start: "<<-?'?EOT'?"
70
+ end: "^EOT"
71
+ rules: []
72
+
73
+ - preproc.shebang: "^#!.+?( |$)"
@@ -0,0 +1,78 @@
1
+ filetype: rust
2
+
3
+ detect:
4
+ filename: "\\.rs$"
5
+
6
+ rules:
7
+ # function definition
8
+ - identifier: "fn [a-z0-9_]+"
9
+ # Reserved words
10
+ - statement: "\\b(abstract|alignof|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|false|final|fn|for|gen|if|impl|in|let|loop|macro|match|mod|move|mut|offsetof|override|priv|pub|pure|ref|return|sizeof|static|self|struct|super|true|trait|type|typeof|try|union|unsafe|unsized|use|virtual|where|while|yield)\\b"
11
+ # macros
12
+ - special: "[a-z_]+!"
13
+ # Constants
14
+ - constant: "\\b[A-Z][A-Z_0-9]+\\b"
15
+ # Numbers
16
+ - constant.number: "\\b[0-9]+\\b"
17
+ # Booleans
18
+ - constant: "\\b(true|false)\\b"
19
+ # Traits/Enums/Structs/Types/etc.
20
+ - type: "\\b[A-Z]+[a-zA-Z_0-9]*[a-z]+[a-zA-Z_0-9]*\\b"
21
+ # Builtin types that start with lowercase.
22
+ - type: "\\b(bool|str|char|((i|u)(8|16|32|64|128|size))|f(16|32|64|128))\\b"
23
+
24
+ - constant.string:
25
+ start: "[bc]?\""
26
+ end: "\""
27
+ skip: '\\.'
28
+ rules:
29
+ - constant.specialChar: '\\.'
30
+
31
+ - constant.string:
32
+ start: "[bc]?r#\""
33
+ end: "\"#"
34
+ rules: []
35
+
36
+ - constant.string:
37
+ start: "[bc]?r##\""
38
+ end: "\"##"
39
+ rules: []
40
+
41
+ - constant.string:
42
+ start: "[bc]?r###\""
43
+ end: "\"###"
44
+ rules: []
45
+
46
+ - constant.string:
47
+ start: "[bc]?r####+\""
48
+ end: "\"####+"
49
+ rules: []
50
+
51
+ # Character literals
52
+ # NOTE: This is an ugly hack to work around the fact that rust uses
53
+ # single quotes both for character literals and lifetimes.
54
+ # Match all character literals.
55
+ - constant.string: "'(\\\\.|.)'"
56
+ # Match the '"' literal which would otherwise match
57
+ # as a double quoted string and destroy the highlighting.
58
+ - constant.string:
59
+ start: "'\""
60
+ end: "'"
61
+ rules: []
62
+
63
+ - comment:
64
+ start: "//"
65
+ end: "$"
66
+ rules:
67
+ - todo: "(TODO|XXX|FIXME):?"
68
+
69
+ - comment:
70
+ start: "/\\*"
71
+ end: "\\*/"
72
+ rules:
73
+ - todo: "(TODO|XXX|FIXME):?"
74
+
75
+ - special:
76
+ start: "#!\\["
77
+ end: "\\]"
78
+ rules: []