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,103 @@
1
+ filetype: swift
2
+
3
+ detect:
4
+ filename: "\\.swift$"
5
+ header: "^#!.*bin/(env +)?swift( |$)"
6
+
7
+ rules:
8
+
9
+ # Patterns
10
+ - type: \b(_)\b
11
+
12
+ # Operators
13
+ - symbol.operator: ([.:;,+*|=!?\\%]|<|>|/|-|&)
14
+
15
+ # Declaration Keywords
16
+ - statement.declaration: \b(associatedtype|class|deinit|enum|extension|fileprivate|func|import|init)\b
17
+ - statement.declaration: \b(inout|internal|let|open|operator|private|protocol|public|static|struct|subscript|typealias|var)\b
18
+
19
+ # Statements Keywords
20
+ - statement: \b(break|case|continue|default|defer|do|else|fallthrough|for|guard)\b
21
+ - statement: \b(if|inif|repeat|return|switch|where|while)\b
22
+
23
+ # keyword.reserved
24
+ - statement.reserved: \b(associativity|convenience|dynamic|didSet|final|get|infix|indirect|lazy|left|mutating)\b
25
+ - statement.reserved: \b(none|nonmutating|override|postfix|precedence|prefix|Protocol|required)\b
26
+ - statement.reserved: \b(right|set|Type|unowned|weak|willSet)\b
27
+
28
+ # Expression and types
29
+ - type: \b(as|Any|catch|is|rethrows|super|self|throw|throws|try)\b
30
+
31
+ - statement.built_in: \b(abs|advance|alignof|alignofValue|anyGenerator|assert|assertionFailure|bridgeFromObjectiveC)\b
32
+ - statement.built_in: \b(bridgeFromObjectiveCUnconditional|bridgeToObjectiveC|bridgeToObjectiveCUnconditional|contains)\b
33
+ - statement.built_in: \b(count|countElements|countLeadingZeros|debugPrint|debugPrintln|distance|dropFirst|dropLast|dump|encodeBitsAsWords)\b
34
+ - statement.built_in: \b(enumerate|equal|fatalError|filter|find|getBridgedObjectiveCType|getVaList|indices|insertionSort)\b
35
+ - statement.built_in: \b(isBridgedToObjectiveC|isBridgedVerbatimToObjectiveC|isUniquelyReferenced|isUniquelyReferencedNonObjC)\b
36
+ - statement.built_in: \b(join|lexicographicalCompare|map|max|maxElement|min|minElement|numericCast|overlaps|partition|posix)\b
37
+ - statement.built_in: \b(precondition|preconditionFailure|print|println|quickSort|readLine|reduce|reflect)\b
38
+ - statement.built_in: \b(reinterpretCast!reverse|roundUpToAlignment|sizeof|sizeofValue|sort|split|startsWith|stride)\b
39
+ - statement.built_in: \b(strideof|strideofValue|swap|toString|transcode|underestimateCount|unsafeAddressOf|unsafeBitCast)\b
40
+ - statement.built_in: \b(unsafeDowncast|unsafeUnwrap|unsafeReflect|withExtendedLifetime|withObjectAtPlusZero|withUnsafePointer)\b
41
+ - statement.built_in: \b(withUnsafePointerToObject|withUnsafeMutablePointer|withUnsafeMutablePointers|withUnsafePointer)\b
42
+ - statement.built_in: \b(withUnsafePointers|withVaList|zip)\b
43
+
44
+ # Meta
45
+ - statement.meta: \@\b(autoclosure|available|convention|exported|IBAction|IBDesignable|IBOutlet|IBInspectable|infix)\b
46
+ - statement.meta: \@\b(lazy|noreturn|noescape|nonobjc|NSApplicationMain|NSCopying|NSManaged|objc|prefix|postfix)\b
47
+ - statement.meta: \@\b(required|testable|warn_unused_result|UIApplicationMain)\b
48
+
49
+ #preprocessor
50
+ - preproc: ^[[:space:]]*#[[:space:]]*(define|else|elseif|endif|if|selector)\b
51
+ - preproc.DebugIdentifier: \b(__COLUMN__|__FILE__|__FUNCTION__|__LINE__)\b
52
+ - preproc.DebugIdentifier: ^[[:space:]]*#[[:space:]]*(column|file|function|line)\b
53
+
54
+ # Constant
55
+ - constant: \b(true|false|nil)
56
+ - constant.number: ([0-9]+)
57
+
58
+ # Storage Types
59
+ - type.storage: \b((U)?Int(8|16|32|64))\b
60
+ - type.storage: \b(Int|UInt|String|Bit|Bool|Character|Double|Optional|Float|Range)\b
61
+ - type.storage: \b(AnyObject)\b
62
+
63
+ # Collections
64
+ - type.collections: \b(Array|Dictionary|Set)\b
65
+
66
+ # Ctypes
67
+ - type.ctypes: \b(CBool|CChar|CUnsignedChar|CShort|CUnsignedShort|CInt|CUnsignedInt|CLong|CUnsignedLong|CLongLong|CUnsignedLongLong|CWideChar|CChar16|CChar32|CFloat|CDouble)\b
68
+
69
+ # String
70
+ - constant.string:
71
+ start: \"
72
+ end: \"
73
+ skip: \\.
74
+ rules:
75
+ - constant.specialChar: (\\0|\\\\|\\t|\\n|\\r|\\"|\\')
76
+ - constant.interpolation: \\\([[:graph:]]*\)
77
+ - constant.unicode: \\u\{[[:xdigit:]]+}
78
+
79
+ # Shebang Line
80
+ - comment.shebang: ^(#!).*
81
+
82
+ # Doc Comment
83
+ - comment.doc: (///).*
84
+
85
+ # Line Comment
86
+ - comment.line: "//.*"
87
+
88
+ # Block Comment
89
+ - comment.block:
90
+ start: "/\\*"
91
+ end: "\\*/"
92
+ rules:
93
+ - todo: "(TODO|XXX|FIXME):?"
94
+
95
+ # Doc Block Comment
96
+ - comment.block:
97
+ start: "/\\*\\*"
98
+ end: "\\*/"
99
+ rules:
100
+ - todo: "(TODO|XXX|FIXME):?"
101
+
102
+ # Todo
103
+ - todo: "(TODO|XXX|FIXME):?"
@@ -0,0 +1,16 @@
1
+ filetype: systemd
2
+
3
+ detect:
4
+ filename: "\\.(service|socket|timer)$"
5
+ header: "^\\[Unit\\]$"
6
+
7
+ rules:
8
+ - statement: "^(Accept|After|Alias|AllowIsolate|Also|ANSI_COLOR|_AUDIT_LOGINUID|_AUDIT_SESSION|Backlog|Before|BindIPv6Only|BindsTo|BindToDevice|BlockIOReadBandwidth|BlockIOWeight|BlockIOWriteBandwidth|_BOOT_ID|Broadcast|BUG_REPORT_URL|BusName|Capabilities|CapabilityBoundingSet|CHASSIS|cipher|class|_CMDLINE|CODE_FILE|CODE_FUNC|CODE_LINE|_COMM|Compress|ConditionACPower|ConditionCapability|ConditionDirectoryNotEmpty|ConditionFileIsExecutable|ConditionFileNotEmpty|ConditionHost|ConditionKernelCommandLine|ConditionNull|ConditionPathExists|ConditionPathExistsGlob|ConditionPathIsDirectory|ConditionPathIsMountPoint|ConditionPathIsReadWrite|ConditionPathIsSymbolicLink|ConditionSecurity|ConditionVirtualization|Conflicts|ControlGroup|ControlGroupAttribute|ControlGroupModify|ControlGroupPersistent|controllers|Controllers|CPE_NAME|CPUAffinity|CPUSchedulingPolicy|CPUSchedulingPriority|CPUSchedulingResetOnFork|CPUShares|CrashChVT|CrashShell|__CURSOR|debug|DefaultControllers|DefaultDependencies|DefaultLimitAS|DefaultLimitCORE|DefaultLimitCPU|DefaultLimitDATA|DefaultLimitFSIZE|DefaultLimitLOCKS|DefaultLimitMEMLOCK|DefaultLimitMSGQUEUE|DefaultLimitNICE|DefaultLimitNOFILE|DefaultLimitNPROC|DefaultLimitRSS|DefaultLimitRTPRIO|DefaultLimitRTTIME|DefaultLimitSIGPENDING|DefaultLimitSTACK|DefaultStandardError|DefaultStandardOutput|Description|DeviceAllow|DeviceDeny|DirectoryMode|DirectoryNotEmpty|Documentation|DumpCore|entropy|Environment|EnvironmentFile|ERRNO|event_timeout|_EXE|ExecReload|ExecStart|ExecStartPost|ExecStartPre|ExecStop|ExecStopPost|ExecStopPre|filter|FONT|FONT_MAP|FONT_UNIMAP|ForwardToConsole|ForwardToKMsg|ForwardToSyslog|FreeBind|freq|FsckPassNo|fstab|_GID|Group|GuessMainPID|HandleHibernateKey|HandleLidSwitch|HandlePowerKey|HandleSuspendKey|hash|HibernateKeyIgnoreInhibited|HOME_URL|_HOSTNAME|ICON_NAME|ID|IdleAction|IdleActionSec|ID_LIKE|ID_MODEL|ID_MODEL_FROM_DATABASE|IgnoreOnIsolate|IgnoreOnSnapshot|IgnoreSIGPIPE|InaccessibleDirectories|InhibitDelayMaxSec|init|IOSchedulingClass|IOSchedulingPriority|IPTOS|IPTTL|JobTimeoutSec|JoinControllers|KeepAlive|KEYMAP|KEYMAP_TOGGLE|KillExcludeUsers|KillMode|KillOnlyUsers|KillSignal|KillUserProcesses|LidSwitchIgnoreInhibited|LimitAS|LimitCORE|LimitCPU|LimitDATA|LimitFSIZE|LimitLOCKS|LimitMEMLOCK|LimitMSGQUEUE|LimitNICE|LimitNOFILE|LimitNPROC|LimitRSS|LimitRTPRIO|LimitRTTIME|LimitSIGPENDING|LimitSTACK|link_priority|valueListenDatagram|ListenFIFO|ListenMessageQueue|ListenNetlink|ListenSequentialPacket|ListenSpecial|ListenStream|LogColor|LogLevel|LogLocation|LogTarget|luks|_MACHINE_ID|MakeDirectory|Mark|MaxConnections|MaxFileSec|MaxLevelConsole|MaxLevelKMsg|MaxLevelStore|MaxLevelSyslog|MaxRetentionSec|MemoryLimit|MemorySoftLimit|MESSAGE|MESSAGE_ID|MessageQueueMaxMessages|MessageQueueMessageSize|__MONOTONIC_TIMESTAMP|MountFlags|NAME|NAutoVTs|Nice|NonBlocking|NoNewPrivileges|NotifyAccess|OnActiveSec|OnBootSec|OnCalendar|OnFailure|OnFailureIsolate|OnStartupSec|OnUnitActiveSec|OnUnitInactiveSec|OOMScoreAdjust|Options|output|PAMName|PartOf|PassCredentials|PassSecurity|PathChanged|PathExists|PathExistsGlob|PathModified|PermissionsStartOnly|_PID|PIDFile|PipeSize|PowerKeyIgnoreInhibited|PRETTY_HOSTNAME|PRETTY_NAME|Priority|PRIORITY|PrivateNetwork|PrivateTmp|PropagatesReloadTo|pss|RateLimitBurst|RateLimitInterval|ReadOnlyDirectories|ReadWriteDirectories|__REALTIME_TIMESTAMP|ReceiveBuffer|RefuseManualStart|RefuseManualStop|rel|ReloadPropagatedFrom|RemainAfterExit|RequiredBy|Requires|RequiresMountsFor|RequiresOverridable|Requisite|RequisiteOverridable|ReserveVT|ResetControllers|Restart|RestartPreventExitStatus|RestartSec|RootDirectory|RootDirectoryStartOnly|RuntimeKeepFree|RuntimeMaxFileSize|RuntimeMaxUse|RuntimeWatchdogSec|samples|scale_x|scale_y|Seal|SecureBits|_SELINUX_CONTEXT|SendBuffer|SendSIGKILL|Service|ShowStatus|ShutdownWatchdogSec|size|SmackLabel|SmackLabelIPIn|SmackLabelIPOut|SocketMode|Sockets|SourcePath|_SOURCE_REALTIME_TIMESTAMP|SplitMode|StandardError|StandardInput|StandardOutput|StartLimitAction|StartLimitBurst|StartLimitInterval|static_node|StopWhenUnneeded|Storage|string_escape|none|replaceSuccessExitStatus|SupplementaryGroups|SUPPORT_URL|SuspendKeyIgnoreInhibited|SyslogFacility|SYSLOG_FACILITY|SyslogIdentifier|SYSLOG_IDENTIFIER|SyslogLevel|SyslogLevelPrefix|SYSLOG_PID|SystemCallFilter|SYSTEMD_ALIAS|_SYSTEMD_CGROUP|_SYSTEMD_OWNER_UID|SYSTEMD_READY|_SYSTEMD_SESSION|_SYSTEMD_UNIT|_SYSTEMD_USER_UNIT|SYSTEMD_WANTS|SystemKeepFree|SystemMaxFileSize|SystemMaxUse|SysVStartPriority|TCPCongestion|TCPWrapName|timeout|TimeoutSec|TimeoutStartSec|TimeoutStopSec|TimerSlackNSec|Transparent|_TRANSPORT|tries|TTYPath|TTYReset|TTYVHangup|TTYVTDisallocate|Type|_UID|UMask|Unit|User|UtmpIdentifier|VERSION|VERSION_ID|WantedBy|Wants|WatchdogSec|What|Where|WorkingDirectory)="
9
+ - preproc: "^\\.include\\>"
10
+ - symbol: "="
11
+ - special: "^\\[(Unit|Install|Service|Socket|Timer)\\]"
12
+ - identifier.class: "\\$MAINPID"
13
+ - constant.bool: "\\b(true|false)\\b"
14
+ - comment: "(^|[[:space:]])#([^{].*)?$"
15
+ - indent-char.whitespace: "[[:space:]]+$"
16
+ - indent-char: " + +| + +"
@@ -0,0 +1,18 @@
1
+ filetype: tcl
2
+
3
+ detect:
4
+ filename: "\\.tcl$"
5
+ header: "^#!.*/(env +)?tclsh( |$)"
6
+
7
+ rules:
8
+ - statement: "\\b(after|append|array|auto_execok|auto_import|auto_load|auto_load_index|auto_qualify|binary|break|case|catch|cd|clock|close|concat|continue|else|elseif|encoding|eof|error|eval|exec|exit|expr|fblocked|fconfigure|fcopy|file|fileevent|flush|for|foreach|format|gets|glob|global|history|if|incr|info|interp|join|lappend|lindex|linsert|list|llength|load|lrange|lreplace|lsearch|lset|lsort|namespace|open|package|pid|puts|pwd|read|regexp|regsub|rename|return|scan|seek|set|socket|source|split|string|subst|switch|tclLog|tell|time|trace|unknown|unset|update|uplevel|upvar|variable|vwait|while)\\b"
9
+ - statement: "\\b(array anymore|array donesearch|array exists|array get|array names|array nextelement|array set|array size|array startsearch|array statistics|array unset)\\b"
10
+ - statement: "\\b(string bytelength|string compare|string equal|string first|string index|string is|string last|string length|string map|string match|string range|string repeat|string replace|string to|string tolower|string totitle|string toupper|string trim|string trimleft|string trimright|string will|string wordend|string wordstart)\\b"
11
+ - statement: "\\b(alarm|auto_load_pkg|bsearch|catclose|catgets|catopen|ccollate|cconcat|cequal|chgrp|chmod|chown|chroot|cindex|clength|cmdtrace|commandloop|crange|csubstr|ctoken|ctype|dup|echo|execl|fcntl|flock|fork|fstat|ftruncate|funlock|host_info|id|infox|keyldel|keylget|keylkeys|keylset|kill|lassign|lcontain|lempty|lgets|link|lmatch|loadlibindex|loop|lvarcat|lvarpop|lvarpush|max|min|nice|pipe|profile|random|readdir|replicate|scancontext|scanfile|scanmatch|select|server_accept|server_create|signal|sleep|sync|system|tclx_findinit|tclx_fork|tclx_load_tndxs|tclx_sleep|tclx_system|tclx_wait|times|translit|try_eval|umask|wait)\\b"
12
+ - identifier.class: "proc[[:space:]]|(\\{|\\})"
13
+ - symbol.operator: "(\\(|\\)|\\;|`|\\\\|\\$|<|>|!|=|&|\\|)"
14
+ - constant.number: "\\b[0-9]+(\\.[0-9]+)?\\b"
15
+ - constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
16
+ - identifier.var: "\\$\\{?[0-9A-Z_!@#$*?-]+\\}?"
17
+ - comment: "(^|;)[[:space:]]*#.*"
18
+ - indent-char.whitespace: "[[:space:]]+$"
@@ -0,0 +1,87 @@
1
+ #
2
+ # This syntax definition is based on the Terraform guide:
3
+ # https://www.terraform.io/docs/configuration/index.html
4
+ #
5
+ # Formatting is loosely based on Sublime's and VSCode's syntax highlighting for Terraform:
6
+ # https://github.com/totoroot/Terraform.tmLanguage/blob/master/Terraform.sublime-syntax
7
+ # https://github.com/hashicorp/vscode-terraform/blob/main/syntaxes/terraform.tmGrammar.json
8
+ #
9
+
10
+ filetype: terraform
11
+
12
+ detect:
13
+ # File Extensions:
14
+ #
15
+ # - ".tf": the standard file extension
16
+ # https://www.terraform.io/docs/configuration/index.html#code-organization
17
+ #
18
+ # - ".hcl": non-terraform tools often use this HCL syntax, i.e. Vault
19
+ # https://www.vaultproject.io/docs/configuration/
20
+ filename: "\\.tf$|\\.hcl$"
21
+
22
+ rules:
23
+ # Named Values
24
+ #
25
+ # https://www.terraform.io/docs/language/expressions/references.html
26
+ - identifier: "\\b(var|local|module|data|path|terraform)\\b"
27
+
28
+ # Block types
29
+ #
30
+ # resource: https://www.terraform.io/docs/language/resources/syntax.html
31
+ # provider: https://www.terraform.io/docs/language/providers/configuration.html
32
+ # variable: https://www.terraform.io/docs/language/values/variables.html
33
+ # output: https://www.terraform.io/docs/language/values/outputs.html
34
+ # locals: https://www.terraform.io/docs/language/values/locals.html
35
+ # module: https://www.terraform.io/docs/language/modules/syntax.html
36
+ # data: https://www.terraform.io/docs/language/data-sources/index.html
37
+ # terraform: https://www.terraform.io/docs/language/settings/index.html#terraform-block-syntax
38
+ - special: "\\b(resource|provider|variable|output|locals|module|terraform)\\b"
39
+
40
+ # Built-In type keywords
41
+ #
42
+ # https://www.terraform.io/docs/language/expressions/type-constraints.html#primitive-types
43
+ # https://www.terraform.io/docs/language/expressions/type-constraints.html#dynamic-types-the-quot-any-quot-constraint
44
+ - type.keyword: "\\b(any|string|number|bool)\\b"
45
+
46
+ # Built-In Functions
47
+ #
48
+ # https://www.terraform.io/docs/language/functions/index.html
49
+ - statement: "\\b(abs|ceil|floor|log|max|min|parseint|pow|signum|chomp|format|formatlist|indent|join|lower|regex|regexall|replace|split|strrev|substr|title|trim|trimprefix|trimsuffix|trimspace|upper|alltrue|anytrue|chunklist|coalesce|coalescelist|compact|concat|contains|distinct|element|flatten|index|keys|length|list|lookup|map|matchkeys|merge|one|range|reverse|setintersection|setproduct|setsubtract|setunion|slice|sort|sum|transpose|values|zipmap|base64decode|base64encode|base64gzip|csvdecode|jsondecode|jsonencode|textdecodebase64|textencodebase64|urlencode|yamldecode|yamlencode|abspath|dirname|pathexpand|basename|file|fileexists|fileset|filebase64|templatefile|formatdate|timeadd|timestamp|base64sha256|base64sha512|bcrypt|filebase64sha256|filebase64sha512|filemd5|filesha1|filesha256|filesha512|md5|rsadecrypt|sha1|sha256|sha512|uuid|uuidv5|cidrhost|cidrnetmask|cidrsubnet|cidrsubnets|can|defaults|nonsensitive|sensitive|tobool|tolist|tomap|tonumber|toset|tostring|try)\\b"
50
+
51
+ - symbol.operator: "([~^.:;,+*|=!\\%@]|<|>|/|-|&)"
52
+
53
+ - symbol.brackets: "([(){}]|\\[|\\])"
54
+
55
+ - constant.number: "\\b([0-9]+|0x[0-9a-fA-F]*)\\b|'.'"
56
+
57
+ - constant.bool: "\\b(true|false|null)\\b"
58
+
59
+ - constant.string:
60
+ start: "\""
61
+ end: "\""
62
+ skip: "\\\\."
63
+ rules:
64
+ - constant.specialChar: "%."
65
+ - constant.specialChar: "\\\\[abfnrtv'\\\"\\\\]"
66
+ - constant.specialChar: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})"
67
+
68
+ - constant.string:
69
+ start: "''"
70
+ end: "''"
71
+ skip: "\\\\."
72
+ rules:
73
+ - constant.specialChar: "%."
74
+ - constant.specialChar: "\\\\[abfnrtv'\\\"\\\\]"
75
+ - constant.specialChar: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})"
76
+
77
+ - comment:
78
+ start: "#|//"
79
+ end: "$\\n?"
80
+ rules:
81
+ - todo: "(TODO|XXX|FIXME):?"
82
+
83
+ - comment:
84
+ start: "/\\*"
85
+ end: "\\*/"
86
+ rules:
87
+ - todo: "(TODO|XXX|FIXME):?"
@@ -0,0 +1,32 @@
1
+ filetype: tex
2
+
3
+ detect:
4
+ filename: "\\.tex$|\\.bib$|\\.cls$"
5
+
6
+ rules:
7
+ # colorize the identifiers of {<identifier>} and [<identifier>]
8
+ - identifier:
9
+ start: "\\{"
10
+ end: "\\}"
11
+ rules: []
12
+ - identifier:
13
+ start: "\\["
14
+ end: "\\]"
15
+ rules: []
16
+ # numbers
17
+ - constant.number: "\\b[0-9]+(\\.[0-9]+)?([[:space:]](pt|mm|cm|in|ex|em|bp|pc|dd|cc|nd|nc|sp))?\\b"
18
+ # let brackets have the default color again
19
+ - default: "[{}\\[\\]]"
20
+ - special: "[&\\\\]"
21
+ # macros
22
+ - statement: "\\\\@?[a-zA-Z_]+"
23
+ - statement: "\\\\%"
24
+ # comments
25
+ - comment:
26
+ start: "[^\\\\]%|^%"
27
+ end: "$"
28
+ rules: []
29
+ - comment:
30
+ start: "\\\\begin\\{comment\\}"
31
+ end: "\\\\end\\{comment\\}"
32
+ rules: []
@@ -0,0 +1,56 @@
1
+ filetype: toml
2
+
3
+ detect:
4
+ filename: "\\.toml"
5
+
6
+ rules:
7
+ # Punctuation
8
+ - symbol: '[=,\.]'
9
+ - symbol.brackets: '[{\[\]}]'
10
+ # Strings
11
+ - constant.string:
12
+ start: '"""'
13
+ end: '\"{3,5}'
14
+ skip: '\\.'
15
+ rules:
16
+ - constant.specialChar: '\\u[[:xdigit:]]{4}'
17
+ - constant.specialChar: '\\U[[:xdigit:]]{8}'
18
+ - constant.specialChar: '\\[btnfr"\\]'
19
+ - constant.string:
20
+ start: '"'
21
+ end: '"'
22
+ skip: '\\.'
23
+ rules:
24
+ - constant.specialChar: '\\u[[:xdigit:]]{4}'
25
+ - constant.specialChar: '\\U[[:xdigit:]]{8}'
26
+ - constant.specialChar: '\\[btnfr"\\]'
27
+ - constant.string:
28
+ start: "'''"
29
+ end: "'{3,5}"
30
+ rules: []
31
+ - constant.string:
32
+ start: "'"
33
+ end: "'"
34
+ rules: []
35
+ # Integer
36
+ - constant.number: '[+-]?(\d+_)*\d+\b'
37
+ - constant.number: '(0x([[:xdigit:]]+_)*[[:xdigit:]]+|0o([0-7]_)*[0-7]+|0b([01]+_)*[01]+)'
38
+ # Float
39
+ - constant.number: '[+-]?(\d+_)*\d+\.(\d+_)*\d+'
40
+ - constant.number: '[+-]?(\d+_)*\d+(\.(\d+_)*\d+)?[Ee][+-]?(\d+_)*\d+'
41
+ - constant.number: '(\+|-)(inf|nan)'
42
+ # Bare key, keys starting with a digit or dash are ambiguous with numbers and are skipped
43
+ - identifier: '\b[A-Za-z_][A-Za-z0-9_-]*\b'
44
+ # Boolean and inf, nan without sign
45
+ - constant.bool.true: '\btrue\b'
46
+ - constant.bool.false: '\bfalse\b'
47
+ - constant.number: '\b(inf|nan)\b'
48
+ # Date and Time
49
+ - constant: '\d+-\d{2}-\d{2}([T ]\d{2}:\d{2}:\d{2}(\.\d+)?([+-]\d{2}:\d{2}|Z)?)?'
50
+ - constant: '\d{2}:\d{2}:\d{2}(\.\d+)?'
51
+ # Comments
52
+ - comment:
53
+ start: "#"
54
+ end: "$"
55
+ rules:
56
+ - todo: "(TODO|XXX|FIXME):?"
@@ -0,0 +1,55 @@
1
+ filetype: twig
2
+
3
+ detect:
4
+ filename: "\\.twig$"
5
+
6
+ rules:
7
+ - include: "html"
8
+ - symbol.tag:
9
+ start: "\\{\\{[[:space:]]"
10
+ end: "[[:space:]]\\}\\}"
11
+ rules:
12
+ - identifier: "\\b(abs|batch|capitalize|convert|encoding|date(_modify)?|default|escape|first|format|join|json_encode|keys|last|length|lower|merge|nl2br|number_format|raw|replace|reverse|round|slice|sort|split|striptags|title|trim|upper|url_encode)\\b"
13
+ - identifier.class: "\\b(attribute|block|constant|cycle|date|dump|include|max|min|parent|random|range|source|template_from_string)\\b"
14
+ - type.keyword: "\\b(and|as|constant|defined|divisibleby|empty|even|false|in|is|iterable|not|null|odd|or|same(as)?|true|with)\\b"
15
+ - symbol.operator: "[.:;,+*?|=!\\%]|<|>|/|-|&"
16
+ - symbol.brackets: "[(){}]|\\[|\\]"
17
+ - constant.number: "\\b[0-9]+\\b|\\b0x[0-9A-Fa-f]+\\b"
18
+ - constant.string:
19
+ start: "\""
20
+ end: "\""
21
+ skip: "\\\\"
22
+ rules:
23
+ - constant.specialChar: "\\\\."
24
+ - constant.string:
25
+ start: "'"
26
+ end: "'"
27
+ skip: "\\\\"
28
+ rules:
29
+ - constant.specialChar: "\\\\."
30
+ - symbol.tag:
31
+ start: "\\{%[[:space:]]"
32
+ end: "[[:space:]]%\\}"
33
+ rules:
34
+ - identifier: "\\b(abs|batch|capitalize|convert|encoding|date(_modify)?|default|escape|first|format|join|json_encode|keys|last|length|lower|merge|nl2br|number_format|raw|replace|reverse|round|slice|sort|split|striptags|title|trim|upper|url_encode)\\b"
35
+ - identifier.class: "\\b(attribute|block|constant|cycle|date|dump|include|max|min|parent|random|range|source|template_from_string)\\b"
36
+ - type.keyword: "\\b(and|as|constant|defined|divisibleby|empty|even|false|in|is|iterable|not|null|odd|or|same(as)?|true|with)\\b"
37
+ - symbol.operator: "[.:;,+*?|=!\\%]|<|>|/|-|&"
38
+ - symbol.brackets: "[(){}]|\\[|\\]"
39
+ - constant.number: "\\b[0-9]+\\b|\\b0x[0-9A-Fa-f]+\\b"
40
+ - constant.string:
41
+ start: "\""
42
+ end: "\""
43
+ skip: "\\\\"
44
+ rules:
45
+ - constant.specialChar: "\\\\."
46
+ - constant.string:
47
+ start: "'"
48
+ end: "'"
49
+ skip: "\\\\"
50
+ rules:
51
+ - constant.specialChar: "\\\\."
52
+ - comment:
53
+ start: "\\{#"
54
+ end: "#\\}"
55
+ rules: []
@@ -0,0 +1,49 @@
1
+ filetype: typescript
2
+
3
+ detect:
4
+ filename: "\\.tsx?$"
5
+
6
+ rules:
7
+ - constant.number: "\\b[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\\b"
8
+ - constant.number: "\\b[-+]?([0-9]+\\.[0-9]*|[0-9]*\\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?"
9
+ - constant.number: "\\b[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?"
10
+ - identifier: "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]"
11
+ - statement: "\\b(abstract|as|async|await|break|case|catch|class|const|constructor|continue)\\b"
12
+ - statement: "\\b(debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from)\\b"
13
+ - statement: "\\b(function|get|if|implements|import|in|instanceof|interface|is|let|module|namespace)\\b"
14
+ - statement: "\\b(new|of|package|private|protected|public|require|return|set|static|super|switch)\\b"
15
+ - statement: "\\b(this|throw|try|type|typeof|var|void|while|with|yield)\\b"
16
+ - constant: "\\b(false|true|null|undefined|NaN)\\b"
17
+ - type: "\\b(Array|Boolean|Date|Enumerator|Error|Function|Math)\\b"
18
+ - type: "\\b(Number|Object|RegExp|String|Symbol)\\b"
19
+ - type: "\\b(any|unknown|boolean|never|number|string|symbol)\\b"
20
+ - statement: "[-+/*=<>!~%?:&|]"
21
+ - constant: "/[^*]([^/]|(\\\\/))*[^\\\\]/[gim]*"
22
+ - constant: "\\\\[0-7][0-7]?[0-7]?|\\\\x[0-9a-fA-F]+|\\\\[bfnrt'\"\\?\\\\]"
23
+ - comment:
24
+ start: "//"
25
+ end: "$"
26
+ rules: []
27
+ - comment:
28
+ start: "/\\*"
29
+ end: "\\*/"
30
+ rules:
31
+ - todo: "TODO:?"
32
+ - constant.string:
33
+ start: "\""
34
+ end: "\""
35
+ skip: "\\\\."
36
+ rules:
37
+ - constant.specialChar: "\\\\."
38
+ - constant.string:
39
+ start: "'"
40
+ end: "'"
41
+ skip: "\\\\."
42
+ rules:
43
+ - constant.specialChar: "\\\\."
44
+ - constant.string:
45
+ start: "`"
46
+ end: "`"
47
+ rules:
48
+ - constant.specialChar: "\\\\."
49
+ - identifier: "\\x24\\{.*?\\}"
@@ -0,0 +1,80 @@
1
+ filetype: v
2
+
3
+ detect:
4
+
5
+ rules:
6
+ # Conditionals and control flow
7
+ - preproc: "\\b(module|import)\\b"
8
+ - statement: "\\b(if|else|for|match|select|defer|or|unsafe)\\b"
9
+ - statement: "\\b(break|continue|goto|return)\\b"
10
+ - type.keyword: "\\b(assert|const|enum|fn|struct|interface|type)\\b"
11
+ - type.keyword: "\\b(pub|mut|__global)\\b"
12
+
13
+ - preproc: "\\$\\b(if|else)\\b"
14
+ - identifier.os: "\\b(mac|macos|linux|windows|freebsd|openbsd|netbsd|dragonfly|android|solaris|haiku)\\b"
15
+ - identifier.compiler: "\\b(gcc|tinyc|clang|mingw|msvc|cplusplus)\\b"
16
+ - identifier.platform: "\\b(amd64|aarch64|x64|x32|little_endian|big_endian)\\b"
17
+ - identifier.other: "\\b(debug|test|js|glibc|prealloc|no_bounds_checking)\\b"
18
+
19
+ - identifier.class: "\\b([A-Z][A-Za-z0-9_]*)\\b"
20
+ - identifier.function: "\\b([a-z_]+\\()"
21
+ - symbol.operator: "\\b(i[ns])\\b|[-+/*<>!=~*%&:|,.?]"
22
+ - symbol.attribute:
23
+ start: "^\\["
24
+ end: "\\]$"
25
+ rules:
26
+ - default: ".*"
27
+ - symbol: "\\b(deprecated|direct_array_access|if|inline|live|ref_only|typedef|windows_stdcall)\\b"
28
+
29
+ # Types
30
+ - type: "\\b(byte|u(16|32|64|128)|i(nt|8|16|64|128)|f(32|64))\\b"
31
+ - type: "\\b(bool|cha[nr]|map|rune|string)\\b"
32
+ - type: "\\b(any(_int|_float)?|size_t|(uint|byte|char|void)ptr)\\b"
33
+ - constant.bool: "\\b(true|false)\\b"
34
+ - constant.none: "\\b(none)\\b"
35
+
36
+ # Brackets
37
+ - symbol.brackets: "(\\{|\\})"
38
+ - symbol.brackets: "(\\(|\\))"
39
+ - symbol.brackets: "(\\[|\\])"
40
+
41
+ # Numbers and strings
42
+ - constant.number: "\\b(0b[01_]+)\\b"
43
+ - constant.number: "\\b(0o[0-7_]+)\\b"
44
+ - constant.number: "\\b(0x[0-9a-fA-F_]+)\\b"
45
+ - constant.number: "\\b([0-9_]+)\\b"
46
+
47
+ - constant.string:
48
+ start: "\""
49
+ end: "\""
50
+ skip: "\\\\."
51
+ rules:
52
+ - constant.specialChar: "%."
53
+ - constant.specialChar: "\\\\[abefnrtv'\\\"\\\\]"
54
+ - constant.specialChar: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})"
55
+
56
+ - constant.string:
57
+ start: "'"
58
+ end: "'"
59
+ skip: "\\\\."
60
+ rules:
61
+ - constant.specialChar: "%."
62
+ - constant.specialChar: "\\\\[abefnrtv'\\\"\\\\]"
63
+ - constant.specialChar: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})"
64
+
65
+ - constant.string:
66
+ start: "`"
67
+ end: "`"
68
+ rules: []
69
+
70
+ - comment:
71
+ start: "//"
72
+ end: "$"
73
+ rules:
74
+ - todo: "(TODO|XXX|FIXME):?"
75
+
76
+ - comment:
77
+ start: "/\\*"
78
+ end: "\\*/"
79
+ rules:
80
+ - todo: "(TODO|XXX|FIXME):?"
@@ -0,0 +1,26 @@
1
+ filetype: vala
2
+
3
+ detect:
4
+ filename: "\\.vala$"
5
+
6
+ rules:
7
+ - type: "\\b(float|double|bool|u?char|u?int(8|16|32|64)?|u?short|u?long|void|s?size_t|unichar)\\b"
8
+ - identifier.class: "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[()]"
9
+ - statement: "\\b(for|if|while|do|else|case|default|switch|try|throw|catch)\\b"
10
+ - statement: "\\b(inline|typedef|struct|enum|union|extern|static|const)\\b"
11
+ - statement: "\\b(operator|new|delete|return|null)\\b"
12
+ - statement: "\\b(class|override|private|public|signal|this|weak)\\b"
13
+ - special: "\\b(goto|break|continue)\\b"
14
+ - constant.bool: "\\b(true|false)\\b"
15
+ - constant.number: "\\b([0-9]+)\\b"
16
+ - symbol.operator: "[\\-+/*=<>?:!~%&|]|->"
17
+ - constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
18
+ - comment: "(^|[[:space:]])//.*"
19
+ - comment:
20
+ start: "/\\*"
21
+ end: "\\*/"
22
+ rules: []
23
+
24
+ - todo: "TODO:?"
25
+ - indent-char.whitespace: "[[:space:]]+$"
26
+ - indent-char: " + +| + +"
@@ -0,0 +1,60 @@
1
+ filetype: verilog
2
+
3
+ detect:
4
+ filename: "\\.(v|vh|sv|svh)$"
5
+
6
+ rules:
7
+ - preproc: "\\b(module|package|program|endmodule|endpackage|endprogram)\\b"
8
+ - type.keyword: "\\b(task|interface|class|endtask|endinterface|endclass)\\b"
9
+ # builtin functions like $display
10
+ - special: "\\$[0-9A-Za-z_]+"
11
+
12
+ # Verilog keywords
13
+ - statement: "\\b(always|and|assign|automatic|begin|buf|bufif0|bufif1|case|casex|casez|cell|cmos|config)\\b"
14
+ - statement: "\\b(deassign|default|defparam|design|disable|edge|else|end|endcase|endconfig|endfunction|endgenerate)\\b"
15
+ - statement: "\\b(endprimitive|endspecify|endtable|event|for|force|forever|fork|function|generate)\\b"
16
+ - statement: "\\b(genvar|highz0|highz1|if|iff|ifnone|incdir|include|initial|input|instance|join)\\b"
17
+ - statement: "\\b(large|liblist|library|localparam|macromodule|medium|nand|negedge|nmos|nor|noshowcancelled)\\b"
18
+ - statement: "\\b(not|notif0|notif1|null|or|output|parameter|pmos|posedge|primitive|pull0|pull1|pulldown|pullup)\\b"
19
+ - statement: "\\b(pulsestyle_onevent|pulsestyle_ondetect|rcmos|realtime|reg|release|repeat|rnmos|rpmos|rtran)\\b"
20
+ - statement: "\\b(rtranif0|rtranif1|scalared|showcancelled|small|specify|specparam|strong0|strong1|supply0)\\b"
21
+ - statement: "\\b(supply1|table|time|tran|tranif0|tranif1|tri0|tri1|triand|trior|trireg|use|uwire)\\b"
22
+ - statement: "\\b(vectored|wait|wand|weak0|weak1|while|wor|xnor|xor)\\b"
23
+
24
+ # SystemVerilog keywords
25
+ - statement: "\\b(alias|always_comb|always_ff|always_latch|assert|assume|before|bind|bins|binsof|break)\\b"
26
+ - statement: "\\b(chandle|clocking|const|constraint|context|continue|cover|covergroup|coverpoint|cross|dist|do)\\b"
27
+ - statement: "\\b(endclocking|endgroup|endproperty|endsequence|enum)\\b"
28
+ - statement: "\\b(expect|export|extends|extern|final|first_match|foreach|forkjoin|ignore_bins|illegal_bins|import)\\b"
29
+ - statement: "\\b(inside|intersect|join_any|join_none|local|longint|matches|modport|new)\\b"
30
+ - statement: "\\b(packed|priority|property|protected|pure|rand|randc|randcase|randsequence|ref|return)\\b"
31
+ - statement: "\\b(sequence|solve|static|struct|super|tagged|this|throughout|timeprecision)\\b"
32
+ - statement: "\\b(timeunit|type|typedef|union|unique|virtual|wait_order|wildcard|with|within)\\b"
33
+
34
+ # types
35
+ - type.keyword: "\\b(int|integer|logic|wire|tri|unsigned|signed|inout|var|shortint|shortreal|real|void|string|bit|byte)\\b"
36
+
37
+ # constants
38
+ - constant.number: "\\b[0-9]+\\b"
39
+ - constant.number: "\\b'[su]?[dboh][0-9xzXZa-fA-F]+\\b"
40
+ # .asdf(...) argument syntax
41
+ - special: "\\.((\\*)|([A-Za-z][A-Za-z0-9_]*))"
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,37 @@
1
+ filetype: vhdl
2
+
3
+ detect:
4
+ filename: "\\.vhdl?$"
5
+
6
+ rules:
7
+ - type: "(?i)\\b(string|integer|natural|positive|(un)?signed|std_u?logic(_vector)?|bit(_vector)?|boolean|u?x01z?|array|range)\\b"
8
+ - identifier: "(?i)library[[:space:]]+[a-zA-Z_0-9]+"
9
+ - identifier: "(?i)use[[:space:]]+[a-zA-Z_0-9\\.]+"
10
+ - identifier: "(?i)component[[:space:]]+[a-zA-Z_0-9]+"
11
+ - identifier: "(?i)(architecture|configuration)[[:space:]]+[a-zA-Z_0-9]+[[:space:]]+of[[:space:]]+[a-zA-Z_0-9]+"
12
+ - identifier: "(?i)(entity|package)[[:space:]]+[a-zA-Z_0-9]+[[:space:]]+is"
13
+ - identifier: "(?i)end[[:space:]]+((architecture|entity|component|process|package|generate)[[:space:]]+)?[a-zA-Z_0-9]+"
14
+ - statement: "(?i)\\b(abs|access|after|alias|all|and|architecture|assert|attribute)\\b"
15
+ - statement: "(?i)\\b(begin|block|body|buffer|bus|case|component|configuration|constant)\\b"
16
+ - statement: "(?i)\\b(disconnect|downto|else|elsif|end|entity|exit)\\b"
17
+ - statement: "(?i)\\b(file|for|function|generate|generic|guarded)\\b"
18
+ - statement: "(?i)\\b(if|impure|in|inertial|inout|is)\\b"
19
+ - statement: "(?i)\\b(label|library|linkage|literal|loop|map|mod)\\b"
20
+ - statement: "(?i)\\b(nand|new|next|nor|not|null|of|on|open|or|others|out)\\b"
21
+ - statement: "(?i)\\b(package|port|postponed|procedure|process|pure)\\b"
22
+ - statement: "(?i)\\b(range|record|register|reject|rem|report|return|rol|ror)\\b"
23
+ - statement: "(?i)\\b(select|severity|shared|signal|sla|sll|sra|srl|subtype)\\b"
24
+ - statement: "(?i)\\b(then|to|transport|type|unaffected|units|until|use)\\b"
25
+ - statement: "(?i)\\b(variable|wait|when|while|with|xnor|xor)\\b"
26
+ - statement: "(?i)'(base|left|right|high|low|pos|val|succ|pred|leftof|rightof|image|(last_)?value)"
27
+ - statement: "(?i)'((reverse_)?range|length|ascending|event|stable)"
28
+ - statement: "(?i)'(simple|path|instance)_name"
29
+ - statement: "(?i)\\b(std_match|(rising|falling)_edge|is_x)\\b"
30
+ - statement: "(?i)\\bto_(unsigned|signed|integer|u?x01z?|stdu?logic(vector)?)\\b"
31
+ - symbol.operator: "(\\+|-|\\*|/|&|<|>|=|\\.|:)"
32
+ - constant.number: "(?i)'([0-1]|u|x|z|w|l|h|-)'|[box]?\"([0-1a-fA-F]|u|x|z|w|l|h|-)+\""
33
+ - constant.number: "(?i)\\b[0-9\\._]+(e[\\-]?[0-9]+)?( ?[fpnum]?s)?\\b"
34
+ - constant.bool: "(?i)\\b(true|false)\\b"
35
+ - constant: "(?i)\\b(note|warning|error|failure)\\b"
36
+ - constant.string: "\"[^\"]*\""
37
+ - comment: "--.*"