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.
- package/LICENSE +22 -0
- package/PORTING.md +34 -0
- package/README.md +153 -0
- package/bmi +5 -0
- package/bun.lock +17 -0
- package/bunmicro +5 -0
- package/hlw.md +5 -0
- package/package.json +18 -0
- package/runtime/colorschemes/atom-dark.micro +33 -0
- package/runtime/colorschemes/bubblegum.micro +31 -0
- package/runtime/colorschemes/cmc-16.micro +47 -0
- package/runtime/colorschemes/cmc-tc.micro +43 -0
- package/runtime/colorschemes/darcula.micro +34 -0
- package/runtime/colorschemes/default.micro +1 -0
- package/runtime/colorschemes/dracula-tc.micro +49 -0
- package/runtime/colorschemes/dukedark-tc.micro +38 -0
- package/runtime/colorschemes/dukelight-tc.micro +38 -0
- package/runtime/colorschemes/dukeubuntu-tc.micro +38 -0
- package/runtime/colorschemes/geany.micro +29 -0
- package/runtime/colorschemes/gotham.micro +29 -0
- package/runtime/colorschemes/gruvbox-tc.micro +29 -0
- package/runtime/colorschemes/gruvbox.micro +26 -0
- package/runtime/colorschemes/material-tc.micro +36 -0
- package/runtime/colorschemes/monokai-dark.micro +28 -0
- package/runtime/colorschemes/monokai.micro +34 -0
- package/runtime/colorschemes/one-dark.micro +39 -0
- package/runtime/colorschemes/railscast.micro +37 -0
- package/runtime/colorschemes/simple.micro +33 -0
- package/runtime/colorschemes/solarized-tc.micro +31 -0
- package/runtime/colorschemes/solarized.micro +30 -0
- package/runtime/colorschemes/sunny-day.micro +29 -0
- package/runtime/colorschemes/twilight.micro +40 -0
- package/runtime/colorschemes/zenburn.micro +30 -0
- package/runtime/help/actions.md +161 -0
- package/runtime/help/colors.md +421 -0
- package/runtime/help/commands.md +161 -0
- package/runtime/help/copypaste.md +149 -0
- package/runtime/help/defaultkeys.md +141 -0
- package/runtime/help/help.md +63 -0
- package/runtime/help/keybindings.md +760 -0
- package/runtime/help/linter.md +90 -0
- package/runtime/help/options.md +701 -0
- package/runtime/help/plugins.md +544 -0
- package/runtime/help/tutorial.md +112 -0
- package/runtime/jsplugins/chapter/chapter.js +108 -0
- package/runtime/jsplugins/diff/diff.js +46 -0
- package/runtime/jsplugins/example/example.js +108 -0
- package/runtime/jsplugins/linter/linter.js +281 -0
- package/runtime/plugins/autoclose/autoclose.lua +75 -0
- package/runtime/plugins/ftoptions/ftoptions.lua +17 -0
- package/runtime/plugins/literate/README.md +5 -0
- package/runtime/plugins/literate/literate.lua +55 -0
- package/runtime/plugins/status/help/status.md +21 -0
- package/runtime/plugins/status/status.lua +62 -0
- package/runtime/syntax/LICENSE +22 -0
- package/runtime/syntax/PowerShell.yaml +128 -0
- package/runtime/syntax/README.md +63 -0
- package/runtime/syntax/ada.yaml +43 -0
- package/runtime/syntax/apacheconf.yaml +59 -0
- package/runtime/syntax/arduino.yaml +101 -0
- package/runtime/syntax/asciidoc.yaml +51 -0
- package/runtime/syntax/asm.yaml +123 -0
- package/runtime/syntax/ats.yaml +99 -0
- package/runtime/syntax/awk.yaml +44 -0
- package/runtime/syntax/b.yaml +87 -0
- package/runtime/syntax/bat.yaml +57 -0
- package/runtime/syntax/c.yaml +60 -0
- package/runtime/syntax/caddyfile.yaml +23 -0
- package/runtime/syntax/cake.yaml +7 -0
- package/runtime/syntax/clojure.yaml +38 -0
- package/runtime/syntax/cmake.yaml +42 -0
- package/runtime/syntax/coffeescript.yaml +56 -0
- package/runtime/syntax/colortest.yaml +19 -0
- package/runtime/syntax/conky.yaml +17 -0
- package/runtime/syntax/cpp.yaml +91 -0
- package/runtime/syntax/crontab.yaml +36 -0
- package/runtime/syntax/crystal.yaml +72 -0
- package/runtime/syntax/csharp.yaml +52 -0
- package/runtime/syntax/css.yaml +44 -0
- package/runtime/syntax/csx.yaml +8 -0
- package/runtime/syntax/cuda.yaml +68 -0
- package/runtime/syntax/cython.yaml +52 -0
- package/runtime/syntax/d.yaml +121 -0
- package/runtime/syntax/dart.yaml +46 -0
- package/runtime/syntax/default.yaml +10 -0
- package/runtime/syntax/dockerfile.yaml +36 -0
- package/runtime/syntax/dot.yaml +29 -0
- package/runtime/syntax/elixir.yaml +30 -0
- package/runtime/syntax/elm.yaml +38 -0
- package/runtime/syntax/erb.yaml +42 -0
- package/runtime/syntax/erlang.yaml +45 -0
- package/runtime/syntax/fish.yaml +48 -0
- package/runtime/syntax/forth.yaml +34 -0
- package/runtime/syntax/fortran.yaml +64 -0
- package/runtime/syntax/freebsd-kernel.yaml +14 -0
- package/runtime/syntax/fsharp.yaml +48 -0
- package/runtime/syntax/gdscript.yaml +61 -0
- package/runtime/syntax/gemini.yaml +19 -0
- package/runtime/syntax/gentoo-ebuild.yaml +48 -0
- package/runtime/syntax/gentoo-etc-portage.yaml +23 -0
- package/runtime/syntax/git-commit.yaml +35 -0
- package/runtime/syntax/git-config.yaml +14 -0
- package/runtime/syntax/git-rebase-todo.yaml +19 -0
- package/runtime/syntax/gleam.yaml +69 -0
- package/runtime/syntax/glsl.yaml +26 -0
- package/runtime/syntax/gnuplot.yaml +15 -0
- package/runtime/syntax/go.yaml +62 -0
- package/runtime/syntax/godoc.yaml +17 -0
- package/runtime/syntax/golo.yaml +73 -0
- package/runtime/syntax/gomod.yaml +31 -0
- package/runtime/syntax/graphql.yaml +47 -0
- package/runtime/syntax/groff.yaml +30 -0
- package/runtime/syntax/groovy.yaml +111 -0
- package/runtime/syntax/haml.yaml +16 -0
- package/runtime/syntax/hare.yaml +52 -0
- package/runtime/syntax/haskell.yaml +52 -0
- package/runtime/syntax/hc.yaml +52 -0
- package/runtime/syntax/html.yaml +70 -0
- package/runtime/syntax/html4.yaml +25 -0
- package/runtime/syntax/html5.yaml +25 -0
- package/runtime/syntax/ini.yaml +23 -0
- package/runtime/syntax/inputrc.yaml +14 -0
- package/runtime/syntax/java.yaml +37 -0
- package/runtime/syntax/javascript.yaml +76 -0
- package/runtime/syntax/jinja2.yaml +19 -0
- package/runtime/syntax/json.yaml +39 -0
- package/runtime/syntax/jsonnet.yaml +92 -0
- package/runtime/syntax/julia.yaml +57 -0
- package/runtime/syntax/justfile.yaml +40 -0
- package/runtime/syntax/keymap.yaml +27 -0
- package/runtime/syntax/kickstart.yaml +16 -0
- package/runtime/syntax/kotlin.yaml +66 -0
- package/runtime/syntax/kvlang.yaml +67 -0
- package/runtime/syntax/ledger.yaml +14 -0
- package/runtime/syntax/lfe.yaml +17 -0
- package/runtime/syntax/lilypond.yaml +26 -0
- package/runtime/syntax/lisp.yaml +17 -0
- package/runtime/syntax/log.yaml +92 -0
- package/runtime/syntax/lua.yaml +111 -0
- package/runtime/syntax/mail.yaml +25 -0
- package/runtime/syntax/makefile.yaml +38 -0
- package/runtime/syntax/man.yaml +12 -0
- package/runtime/syntax/markdown.yaml +49 -0
- package/runtime/syntax/mc.yaml +23 -0
- package/runtime/syntax/meson.yaml +51 -0
- package/runtime/syntax/micro.yaml +34 -0
- package/runtime/syntax/mpdconf.yaml +13 -0
- package/runtime/syntax/msbuild.yaml +6 -0
- package/runtime/syntax/nanorc.yaml +16 -0
- package/runtime/syntax/nftables.yaml +30 -0
- package/runtime/syntax/nginx.yaml +22 -0
- package/runtime/syntax/nim.yaml +27 -0
- package/runtime/syntax/nix.yaml +32 -0
- package/runtime/syntax/nu.yaml +114 -0
- package/runtime/syntax/objc.yaml +60 -0
- package/runtime/syntax/ocaml.yaml +43 -0
- package/runtime/syntax/octave.yaml +83 -0
- package/runtime/syntax/odin.yaml +64 -0
- package/runtime/syntax/pascal.yaml +45 -0
- package/runtime/syntax/patch.yaml +14 -0
- package/runtime/syntax/peg.yaml +16 -0
- package/runtime/syntax/perl.yaml +58 -0
- package/runtime/syntax/php.yaml +60 -0
- package/runtime/syntax/pkg-config.yaml +12 -0
- package/runtime/syntax/po.yaml +12 -0
- package/runtime/syntax/pony.yaml +37 -0
- package/runtime/syntax/pov.yaml +21 -0
- package/runtime/syntax/privoxy-action.yaml +14 -0
- package/runtime/syntax/privoxy-config.yaml +10 -0
- package/runtime/syntax/privoxy-filter.yaml +12 -0
- package/runtime/syntax/proto.yaml +40 -0
- package/runtime/syntax/prql.yaml +84 -0
- package/runtime/syntax/puppet.yaml +22 -0
- package/runtime/syntax/python2.yaml +60 -0
- package/runtime/syntax/python3.yaml +62 -0
- package/runtime/syntax/r.yaml +32 -0
- package/runtime/syntax/raku.yaml +42 -0
- package/runtime/syntax/reST.yaml +18 -0
- package/runtime/syntax/renpy.yaml +15 -0
- package/runtime/syntax/rpmspec.yaml +43 -0
- package/runtime/syntax/ruby.yaml +73 -0
- package/runtime/syntax/rust.yaml +78 -0
- package/runtime/syntax/sage.yaml +60 -0
- package/runtime/syntax/scad.yaml +53 -0
- package/runtime/syntax/scala.yaml +33 -0
- package/runtime/syntax/sed.yaml +13 -0
- package/runtime/syntax/sh.yaml +69 -0
- package/runtime/syntax/sls.yaml +15 -0
- package/runtime/syntax/smalltalk.yaml +55 -0
- package/runtime/syntax/solidity.yaml +41 -0
- package/runtime/syntax/sql.yaml +35 -0
- package/runtime/syntax/stata.yaml +67 -0
- package/runtime/syntax/svelte.yaml +27 -0
- package/runtime/syntax/swift.yaml +103 -0
- package/runtime/syntax/systemd.yaml +16 -0
- package/runtime/syntax/tcl.yaml +18 -0
- package/runtime/syntax/terraform.yaml +87 -0
- package/runtime/syntax/tex.yaml +32 -0
- package/runtime/syntax/toml.yaml +56 -0
- package/runtime/syntax/twig.yaml +55 -0
- package/runtime/syntax/typescript.yaml +49 -0
- package/runtime/syntax/v.yaml +80 -0
- package/runtime/syntax/vala.yaml +26 -0
- package/runtime/syntax/verilog.yaml +60 -0
- package/runtime/syntax/vhdl.yaml +37 -0
- package/runtime/syntax/vi.yaml +31 -0
- package/runtime/syntax/vue.yaml +64 -0
- package/runtime/syntax/xml.yaml +37 -0
- package/runtime/syntax/xresources.yaml +14 -0
- package/runtime/syntax/yaml.yaml +34 -0
- package/runtime/syntax/yum.yaml +12 -0
- package/runtime/syntax/zig.yaml +52 -0
- package/runtime/syntax/zscript.yaml +72 -0
- package/runtime/syntax/zsh.yaml +52 -0
- package/src/buffer/buffer.js +126 -0
- package/src/buffer/loc.js +38 -0
- package/src/buffer/message.js +29 -0
- package/src/config/colorscheme.js +109 -0
- package/src/config/config.js +118 -0
- package/src/config/defaults.js +102 -0
- package/src/display/ansi-style.js +60 -0
- package/src/highlight/highlighter.js +237 -0
- package/src/highlight/parser.js +137 -0
- package/src/index.js +5942 -0
- package/src/lua/engine.js +38 -0
- package/src/platform/archive.js +50 -0
- package/src/platform/clipboard.js +160 -0
- package/src/platform/commands.js +140 -0
- package/src/plugins/js-bridge.js +902 -0
- package/src/plugins/manager.js +619 -0
- package/src/runtime/registry.js +89 -0
- package/src/screen/cell-buffer.js +81 -0
- package/src/screen/events.js +263 -0
- package/src/screen/screen.js +118 -0
- package/src/screen/vt100.js +391 -0
- package/src/shell/shell.js +70 -0
- 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: "--.*"
|