bunmicro 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (237) hide show
  1. package/LICENSE +22 -0
  2. package/PORTING.md +34 -0
  3. package/README.md +153 -0
  4. package/bmi +5 -0
  5. package/bun.lock +17 -0
  6. package/bunmicro +5 -0
  7. package/hlw.md +5 -0
  8. package/package.json +18 -0
  9. package/runtime/colorschemes/atom-dark.micro +33 -0
  10. package/runtime/colorschemes/bubblegum.micro +31 -0
  11. package/runtime/colorschemes/cmc-16.micro +47 -0
  12. package/runtime/colorschemes/cmc-tc.micro +43 -0
  13. package/runtime/colorschemes/darcula.micro +34 -0
  14. package/runtime/colorschemes/default.micro +1 -0
  15. package/runtime/colorschemes/dracula-tc.micro +49 -0
  16. package/runtime/colorschemes/dukedark-tc.micro +38 -0
  17. package/runtime/colorschemes/dukelight-tc.micro +38 -0
  18. package/runtime/colorschemes/dukeubuntu-tc.micro +38 -0
  19. package/runtime/colorschemes/geany.micro +29 -0
  20. package/runtime/colorschemes/gotham.micro +29 -0
  21. package/runtime/colorschemes/gruvbox-tc.micro +29 -0
  22. package/runtime/colorschemes/gruvbox.micro +26 -0
  23. package/runtime/colorschemes/material-tc.micro +36 -0
  24. package/runtime/colorschemes/monokai-dark.micro +28 -0
  25. package/runtime/colorschemes/monokai.micro +34 -0
  26. package/runtime/colorschemes/one-dark.micro +39 -0
  27. package/runtime/colorschemes/railscast.micro +37 -0
  28. package/runtime/colorschemes/simple.micro +33 -0
  29. package/runtime/colorschemes/solarized-tc.micro +31 -0
  30. package/runtime/colorschemes/solarized.micro +30 -0
  31. package/runtime/colorschemes/sunny-day.micro +29 -0
  32. package/runtime/colorschemes/twilight.micro +40 -0
  33. package/runtime/colorschemes/zenburn.micro +30 -0
  34. package/runtime/help/actions.md +161 -0
  35. package/runtime/help/colors.md +421 -0
  36. package/runtime/help/commands.md +161 -0
  37. package/runtime/help/copypaste.md +149 -0
  38. package/runtime/help/defaultkeys.md +141 -0
  39. package/runtime/help/help.md +63 -0
  40. package/runtime/help/keybindings.md +760 -0
  41. package/runtime/help/linter.md +90 -0
  42. package/runtime/help/options.md +701 -0
  43. package/runtime/help/plugins.md +544 -0
  44. package/runtime/help/tutorial.md +112 -0
  45. package/runtime/jsplugins/chapter/chapter.js +108 -0
  46. package/runtime/jsplugins/diff/diff.js +46 -0
  47. package/runtime/jsplugins/example/example.js +108 -0
  48. package/runtime/jsplugins/linter/linter.js +281 -0
  49. package/runtime/plugins/autoclose/autoclose.lua +75 -0
  50. package/runtime/plugins/ftoptions/ftoptions.lua +17 -0
  51. package/runtime/plugins/literate/README.md +5 -0
  52. package/runtime/plugins/literate/literate.lua +55 -0
  53. package/runtime/plugins/status/help/status.md +21 -0
  54. package/runtime/plugins/status/status.lua +62 -0
  55. package/runtime/syntax/LICENSE +22 -0
  56. package/runtime/syntax/PowerShell.yaml +128 -0
  57. package/runtime/syntax/README.md +63 -0
  58. package/runtime/syntax/ada.yaml +43 -0
  59. package/runtime/syntax/apacheconf.yaml +59 -0
  60. package/runtime/syntax/arduino.yaml +101 -0
  61. package/runtime/syntax/asciidoc.yaml +51 -0
  62. package/runtime/syntax/asm.yaml +123 -0
  63. package/runtime/syntax/ats.yaml +99 -0
  64. package/runtime/syntax/awk.yaml +44 -0
  65. package/runtime/syntax/b.yaml +87 -0
  66. package/runtime/syntax/bat.yaml +57 -0
  67. package/runtime/syntax/c.yaml +60 -0
  68. package/runtime/syntax/caddyfile.yaml +23 -0
  69. package/runtime/syntax/cake.yaml +7 -0
  70. package/runtime/syntax/clojure.yaml +38 -0
  71. package/runtime/syntax/cmake.yaml +42 -0
  72. package/runtime/syntax/coffeescript.yaml +56 -0
  73. package/runtime/syntax/colortest.yaml +19 -0
  74. package/runtime/syntax/conky.yaml +17 -0
  75. package/runtime/syntax/cpp.yaml +91 -0
  76. package/runtime/syntax/crontab.yaml +36 -0
  77. package/runtime/syntax/crystal.yaml +72 -0
  78. package/runtime/syntax/csharp.yaml +52 -0
  79. package/runtime/syntax/css.yaml +44 -0
  80. package/runtime/syntax/csx.yaml +8 -0
  81. package/runtime/syntax/cuda.yaml +68 -0
  82. package/runtime/syntax/cython.yaml +52 -0
  83. package/runtime/syntax/d.yaml +121 -0
  84. package/runtime/syntax/dart.yaml +46 -0
  85. package/runtime/syntax/default.yaml +10 -0
  86. package/runtime/syntax/dockerfile.yaml +36 -0
  87. package/runtime/syntax/dot.yaml +29 -0
  88. package/runtime/syntax/elixir.yaml +30 -0
  89. package/runtime/syntax/elm.yaml +38 -0
  90. package/runtime/syntax/erb.yaml +42 -0
  91. package/runtime/syntax/erlang.yaml +45 -0
  92. package/runtime/syntax/fish.yaml +48 -0
  93. package/runtime/syntax/forth.yaml +34 -0
  94. package/runtime/syntax/fortran.yaml +64 -0
  95. package/runtime/syntax/freebsd-kernel.yaml +14 -0
  96. package/runtime/syntax/fsharp.yaml +48 -0
  97. package/runtime/syntax/gdscript.yaml +61 -0
  98. package/runtime/syntax/gemini.yaml +19 -0
  99. package/runtime/syntax/gentoo-ebuild.yaml +48 -0
  100. package/runtime/syntax/gentoo-etc-portage.yaml +23 -0
  101. package/runtime/syntax/git-commit.yaml +35 -0
  102. package/runtime/syntax/git-config.yaml +14 -0
  103. package/runtime/syntax/git-rebase-todo.yaml +19 -0
  104. package/runtime/syntax/gleam.yaml +69 -0
  105. package/runtime/syntax/glsl.yaml +26 -0
  106. package/runtime/syntax/gnuplot.yaml +15 -0
  107. package/runtime/syntax/go.yaml +62 -0
  108. package/runtime/syntax/godoc.yaml +17 -0
  109. package/runtime/syntax/golo.yaml +73 -0
  110. package/runtime/syntax/gomod.yaml +31 -0
  111. package/runtime/syntax/graphql.yaml +47 -0
  112. package/runtime/syntax/groff.yaml +30 -0
  113. package/runtime/syntax/groovy.yaml +111 -0
  114. package/runtime/syntax/haml.yaml +16 -0
  115. package/runtime/syntax/hare.yaml +52 -0
  116. package/runtime/syntax/haskell.yaml +52 -0
  117. package/runtime/syntax/hc.yaml +52 -0
  118. package/runtime/syntax/html.yaml +70 -0
  119. package/runtime/syntax/html4.yaml +25 -0
  120. package/runtime/syntax/html5.yaml +25 -0
  121. package/runtime/syntax/ini.yaml +23 -0
  122. package/runtime/syntax/inputrc.yaml +14 -0
  123. package/runtime/syntax/java.yaml +37 -0
  124. package/runtime/syntax/javascript.yaml +76 -0
  125. package/runtime/syntax/jinja2.yaml +19 -0
  126. package/runtime/syntax/json.yaml +39 -0
  127. package/runtime/syntax/jsonnet.yaml +92 -0
  128. package/runtime/syntax/julia.yaml +57 -0
  129. package/runtime/syntax/justfile.yaml +40 -0
  130. package/runtime/syntax/keymap.yaml +27 -0
  131. package/runtime/syntax/kickstart.yaml +16 -0
  132. package/runtime/syntax/kotlin.yaml +66 -0
  133. package/runtime/syntax/kvlang.yaml +67 -0
  134. package/runtime/syntax/ledger.yaml +14 -0
  135. package/runtime/syntax/lfe.yaml +17 -0
  136. package/runtime/syntax/lilypond.yaml +26 -0
  137. package/runtime/syntax/lisp.yaml +17 -0
  138. package/runtime/syntax/log.yaml +92 -0
  139. package/runtime/syntax/lua.yaml +111 -0
  140. package/runtime/syntax/mail.yaml +25 -0
  141. package/runtime/syntax/makefile.yaml +38 -0
  142. package/runtime/syntax/man.yaml +12 -0
  143. package/runtime/syntax/markdown.yaml +49 -0
  144. package/runtime/syntax/mc.yaml +23 -0
  145. package/runtime/syntax/meson.yaml +51 -0
  146. package/runtime/syntax/micro.yaml +34 -0
  147. package/runtime/syntax/mpdconf.yaml +13 -0
  148. package/runtime/syntax/msbuild.yaml +6 -0
  149. package/runtime/syntax/nanorc.yaml +16 -0
  150. package/runtime/syntax/nftables.yaml +30 -0
  151. package/runtime/syntax/nginx.yaml +22 -0
  152. package/runtime/syntax/nim.yaml +27 -0
  153. package/runtime/syntax/nix.yaml +32 -0
  154. package/runtime/syntax/nu.yaml +114 -0
  155. package/runtime/syntax/objc.yaml +60 -0
  156. package/runtime/syntax/ocaml.yaml +43 -0
  157. package/runtime/syntax/octave.yaml +83 -0
  158. package/runtime/syntax/odin.yaml +64 -0
  159. package/runtime/syntax/pascal.yaml +45 -0
  160. package/runtime/syntax/patch.yaml +14 -0
  161. package/runtime/syntax/peg.yaml +16 -0
  162. package/runtime/syntax/perl.yaml +58 -0
  163. package/runtime/syntax/php.yaml +60 -0
  164. package/runtime/syntax/pkg-config.yaml +12 -0
  165. package/runtime/syntax/po.yaml +12 -0
  166. package/runtime/syntax/pony.yaml +37 -0
  167. package/runtime/syntax/pov.yaml +21 -0
  168. package/runtime/syntax/privoxy-action.yaml +14 -0
  169. package/runtime/syntax/privoxy-config.yaml +10 -0
  170. package/runtime/syntax/privoxy-filter.yaml +12 -0
  171. package/runtime/syntax/proto.yaml +40 -0
  172. package/runtime/syntax/prql.yaml +84 -0
  173. package/runtime/syntax/puppet.yaml +22 -0
  174. package/runtime/syntax/python2.yaml +60 -0
  175. package/runtime/syntax/python3.yaml +62 -0
  176. package/runtime/syntax/r.yaml +32 -0
  177. package/runtime/syntax/raku.yaml +42 -0
  178. package/runtime/syntax/reST.yaml +18 -0
  179. package/runtime/syntax/renpy.yaml +15 -0
  180. package/runtime/syntax/rpmspec.yaml +43 -0
  181. package/runtime/syntax/ruby.yaml +73 -0
  182. package/runtime/syntax/rust.yaml +78 -0
  183. package/runtime/syntax/sage.yaml +60 -0
  184. package/runtime/syntax/scad.yaml +53 -0
  185. package/runtime/syntax/scala.yaml +33 -0
  186. package/runtime/syntax/sed.yaml +13 -0
  187. package/runtime/syntax/sh.yaml +69 -0
  188. package/runtime/syntax/sls.yaml +15 -0
  189. package/runtime/syntax/smalltalk.yaml +55 -0
  190. package/runtime/syntax/solidity.yaml +41 -0
  191. package/runtime/syntax/sql.yaml +35 -0
  192. package/runtime/syntax/stata.yaml +67 -0
  193. package/runtime/syntax/svelte.yaml +27 -0
  194. package/runtime/syntax/swift.yaml +103 -0
  195. package/runtime/syntax/systemd.yaml +16 -0
  196. package/runtime/syntax/tcl.yaml +18 -0
  197. package/runtime/syntax/terraform.yaml +87 -0
  198. package/runtime/syntax/tex.yaml +32 -0
  199. package/runtime/syntax/toml.yaml +56 -0
  200. package/runtime/syntax/twig.yaml +55 -0
  201. package/runtime/syntax/typescript.yaml +49 -0
  202. package/runtime/syntax/v.yaml +80 -0
  203. package/runtime/syntax/vala.yaml +26 -0
  204. package/runtime/syntax/verilog.yaml +60 -0
  205. package/runtime/syntax/vhdl.yaml +37 -0
  206. package/runtime/syntax/vi.yaml +31 -0
  207. package/runtime/syntax/vue.yaml +64 -0
  208. package/runtime/syntax/xml.yaml +37 -0
  209. package/runtime/syntax/xresources.yaml +14 -0
  210. package/runtime/syntax/yaml.yaml +34 -0
  211. package/runtime/syntax/yum.yaml +12 -0
  212. package/runtime/syntax/zig.yaml +52 -0
  213. package/runtime/syntax/zscript.yaml +72 -0
  214. package/runtime/syntax/zsh.yaml +52 -0
  215. package/src/buffer/buffer.js +126 -0
  216. package/src/buffer/loc.js +38 -0
  217. package/src/buffer/message.js +29 -0
  218. package/src/config/colorscheme.js +109 -0
  219. package/src/config/config.js +118 -0
  220. package/src/config/defaults.js +102 -0
  221. package/src/display/ansi-style.js +60 -0
  222. package/src/highlight/highlighter.js +237 -0
  223. package/src/highlight/parser.js +137 -0
  224. package/src/index.js +5942 -0
  225. package/src/lua/engine.js +38 -0
  226. package/src/platform/archive.js +50 -0
  227. package/src/platform/clipboard.js +160 -0
  228. package/src/platform/commands.js +140 -0
  229. package/src/plugins/js-bridge.js +902 -0
  230. package/src/plugins/manager.js +619 -0
  231. package/src/runtime/registry.js +89 -0
  232. package/src/screen/cell-buffer.js +81 -0
  233. package/src/screen/events.js +263 -0
  234. package/src/screen/screen.js +118 -0
  235. package/src/screen/vt100.js +391 -0
  236. package/src/shell/shell.js +70 -0
  237. package/todo.txt +359 -0
@@ -0,0 +1,22 @@
1
+ filetype: nginx
2
+
3
+ detect:
4
+ filename: "nginx.*\\.conf$|\\.nginx$|\\.sub(domain|folder)\\.conf$"
5
+ header: "^(server|upstream)[a-z ]*\\{$"
6
+
7
+ rules:
8
+ - preproc: "\\b(events|server|http|location|upstream)[[:space:]]*\\{"
9
+ - statement: "(^|[[:space:]{;])(access_log|add_after_body|add_before_body|add_header|addition_types|aio|alias|allow|ancient_browser|ancient_browser_value|auth_basic|auth_basic_user_file|autoindex|autoindex_exact_size|autoindex_localtime|break|charset|charset_map|charset_types|chunked_transfer_encoding|client_body_buffer_size|client_body_in_file_only|client_body_in_single_buffer|client_body_temp_path|client_body_timeout|client_header_buffer_size|client_header_timeout|client_max_body_size|connection_pool_size|create_full_put_path|daemon|dav_access|dav_methods|default_type|deny|directio|directio_alignment|disable_symlinks|empty_gif|env|error_log|error_page|expires|fastcgi_buffer_size|fastcgi_buffers|fastcgi_busy_buffers_size|fastcgi_cache|fastcgi_cache_bypass|fastcgi_cache_key|fastcgi_cache_lock|fastcgi_cache_lock_timeout|fastcgi_cache_min_uses|fastcgi_cache_path|fastcgi_cache_use_stale|fastcgi_cache_valid|fastcgi_connect_timeout|fastcgi_hide_header|fastcgi_ignore_client_abort|fastcgi_ignore_headers|fastcgi_index|fastcgi_intercept_errors|fastcgi_keep_conn|fastcgi_max_temp_file_size|fastcgi_next_upstream|fastcgi_no_cache|fastcgi_param|fastcgi_pass|fastcgi_pass_header|fastcgi_read_timeout|fastcgi_send_timeout|fastcgi_split_path_info|fastcgi_store|fastcgi_store_access|fastcgi_temp_file_write_size|fastcgi_temp_path|flv|geo|geoip_city|geoip_country|gzip|gzip_buffers|gzip_comp_level|gzip_disable|gzip_http_version|gzip_min_length|gzip_proxied|gzip_static|gzip_types|gzip_vary|if|if_modified_since|ignore_invalid_headers|image_filter|image_filter_buffer|image_filter_jpeg_quality|image_filter_sharpen|image_filter_transparency|include|index|internal|ip_hash|keepalive|keepalive_disable|keepalive_requests|keepalive_timeout|large_client_header_buffers|limit_conn|limit_conn_log_level|limit_conn_zone|limit_except|limit_rate|limit_rate_after|limit_req|limit_req_log_level|limit_req_zone|limit_zone|lingering_close|lingering_time|lingering_timeout|listen|location|log_format|log_not_found|log_subrequest|map|map_hash_bucket_size|map_hash_max_size|master_process|max_ranges|memcached_buffer_size|memcached_connect_timeout|memcached_next_upstream|memcached_pass|memcached_read_timeout|memcached_send_timeout|merge_slashes|min_delete_depth|modern_browser|modern_browser_value|mp4|mp4_buffer_size|mp4_max_buffer_size|msie_padding|msie_refresh|open_file_cache|open_file_cache_errors|open_file_cache_min_uses|open_file_cache_valid|open_log_file_cache|optimize_server_names|override_charset|pcre_jit|perl|perl_modules|perl_require|perl_set|pid|port_in_redirect|postpone_output|proxy_buffer_size|proxy_buffering|proxy_buffers|proxy_busy_buffers_size|proxy_cache|proxy_cache_bypass|proxy_cache_key|proxy_cache_lock|proxy_cache_lock_timeout|proxy_cache_min_uses|proxy_cache_path|proxy_cache_use_stale|proxy_cache_valid|proxy_connect_timeout|proxy_cookie_domain|proxy_cookie_path|proxy_hide_header|proxy_http_version|proxy_ignore_client_abort|proxy_ignore_headers|proxy_intercept_errors|proxy_max_temp_file_size|proxy_next_upstream|proxy_no_cache|proxy_pass|proxy_pass_header|proxy_read_timeout|proxy_redirect|proxy_send_timeout|proxy_set_header|proxy_ssl_session_reuse|proxy_store|proxy_store_access|proxy_temp_file_write_size|proxy_temp_path|random_index|read_ahead|real_ip_header|recursive_error_pages|request_pool_size|reset_timedout_connection|resolver|resolver_timeout|return|rewrite|root|satisfy|satisfy_any|secure_link_secret|send_lowat|send_timeout|sendfile|sendfile_max_chunk|server|server|server_name|server_name_in_redirect|server_names_hash_bucket_size|server_names_hash_max_size|server_tokens|set|set_real_ip_from|source_charset|split_clients|ssi|ssi_silent_errors|ssi_types|ssl|ssl_certificate|ssl_certificate_key|ssl_ciphers|ssl_client_certificate|ssl_crl|ssl_dhparam|ssl_engine|ssl_prefer_server_ciphers|ssl_protocols|ssl_session_cache|ssl_session_timeout|ssl_verify_client|ssl_verify_depth|sub_filter|sub_filter_once|sub_filter_types|tcp_nodelay|tcp_nopush|timer_resolution|try_files|types|types_hash_bucket_size|types_hash_max_size|underscores_in_headers|uninitialized_variable_warn|upstream|user|userid|userid_domain|userid_expires|userid_name|userid_p3p|userid_path|userid_service|valid_referers|variables_hash_bucket_size|variables_hash_max_size|worker_priority|worker_processes|worker_rlimit_core|worker_rlimit_nofile|working_directory|xml_entities|xslt_stylesheet|xslt_types)([[:space:]]|$)"
10
+ - constant.bool.true: "\\b(on)\\b"
11
+ - constant.bool.false: "\\b(off)\\b"
12
+ - identifier: "\\$[A-Za-z][A-Za-z0-9_]*"
13
+ - symbol: "[*]"
14
+ - constant-string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
15
+ - constant.string:
16
+ start: "'$"
17
+ end: "';$"
18
+ rules: []
19
+
20
+ - comment: "(^|[[:space:]])#([^{].*)?$"
21
+ - indent-char.whitespace: "[[:space:]]+$"
22
+ - indent-char: " + +| + +"
@@ -0,0 +1,27 @@
1
+ filetype: nim
2
+
3
+ detect:
4
+ filename: "\\.nims?$|nim.cfg"
5
+
6
+ rules:
7
+ - preproc: "[\\{\\|]\\b(atom|lit|sym|ident|call|lvalue|sideeffect|nosideeffect|param|genericparam|module|type|let|var|const|result|proc|method|iterator|converter|macro|template|field|enumfield|forvar|label|nk[a-zA-Z]+|alias|noalias)\\b[\\}\\|]"
8
+ - statement: "\\b(addr|and|as|asm|atomic|bind|block|break|case|cast|concept|const|continue|converter|defer|discard|distinct|div|do|elif|else|end|enum|except|export|finally|for|from|func|generic|if|import|in|include|interface|is|isnot|iterator|let|macro|method|mixin|mod|nil|not|notin|object|of|or|out|proc|ptr|raise|ref|return|shl|shr|static|template|try|tuple|type|using|var|when|while|with|without|xor|yield)\\b"
9
+ - statement: "\\b(deprecated|noSideEffect|constructor|destructor|override|procvar|compileTime|noReturn|acyclic|final|shallow|pure|asmNoStackFrame|error|fatal|warning|hint|line|linearScanEnd|computedGoto|unroll|immediate|checks|boundsChecks|overflowChecks|nilChecks|assertations|warnings|hints|optimization|patterns|callconv|push|pop|global|pragma|experimental|bitsize|volatile|noDecl|header|incompleteStruct|compile|link|passC|passL|emit|importc|importcpp|importobjc|codegenDecl|injectStmt|intdefine|strdefine|varargs|exportc|extern|bycopy|byref|union|packed|unchecked|dynlib|cdecl|thread|gcsafe|threadvar|guard|locks|compileTime)\\b"
10
+ - symbol.operator: "[=\\+\\-\\*/<>@\\$~&%\\|!\\?\\^\\.:\\\\]+"
11
+ - special: "\\{\\.|\\.\\}|\\[\\.|\\.\\]|\\(\\.|\\.\\)|;|,|`"
12
+ - statement: "\\.\\."
13
+ - type: "\\b(int|cint|int8|int16|int32|int64|uint|uint8|uint16|uint32|uint64|float|float32|float64|bool|char|enum|string|cstring|cstringArray|cdouble|csize_t|pointer|array|openarray|seq|varargs|tuple|object|set|void|auto|cshort|clong|range|nil|T|untyped|typedesc)\\b"
14
+ - type: "'[iI](8|16|32|64)?\\b|'[uU](8|16|32|64)?\\b|'[fF](32|64|128)?\\b|'[dD]\\b"
15
+ - constant.number: "\\b[0-9]+\\b"
16
+ - constant.number: "\\b0[xX][0-9A-Fa-f][0-9_A-Fa-f]+\\b"
17
+ - constant.number: "\\b0[ocC][0-7][0-7_]+\\b"
18
+ - constant.number: "\\b0[bB][01][01_]+\\b"
19
+ - constant.number: "\\b[0-9_]((\\.?)[0-9_]+)?[eE][+\\-][0-9][0-9_]+\\b"
20
+ - constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
21
+ - comment: "[[:space:]]*(?:[^\\\\]|^)#.*$"
22
+ - comment:
23
+ start: "\\#\\["
24
+ end: "\\]\\#"
25
+ rules: []
26
+
27
+ - todo: "(TODO|FIXME|XXX):?"
@@ -0,0 +1,32 @@
1
+ filetype: nix
2
+
3
+ detect:
4
+ filename: "\\.nix$"
5
+
6
+ rules:
7
+ - special: "\\b(Ellipsis|null|self|super|true|false|abort)\\b"
8
+ - statement: "\\b(let|in|with|import|rec|inherit)\\b"
9
+ - symbol.operator: "([~^.:;,+*|=!\\%@]|<|>|/|-|&)"
10
+ - symbol.brackets: "([(){}]|\\[|\\])"
11
+
12
+ - constant.number: "\\b[0-9](_?[0-9])*(\\.([0-9](_?[0-9])*)?)?(e[0-9](_?[0-9])*)?\\b"
13
+
14
+ - constant.string:
15
+ start: "\""
16
+ end: "\""
17
+ rules: []
18
+
19
+ - constant.string:
20
+ start: "''"
21
+ end: "''"
22
+ rules: []
23
+
24
+ - comment:
25
+ start: "#"
26
+ end: "$"
27
+ rules: []
28
+
29
+ - comment:
30
+ start: "/\\*"
31
+ end: "\\*/"
32
+ rules: []
@@ -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'\\\"\\\\]"