Use new syntax highlighting engine from zyedidia/highlight

This changes all the syntax files in the runtime directory and also
changes how syntax highlighting is done from inside micro.
This commit is contained in:
Zachary Yedidia
2017-02-18 15:17:07 -05:00
parent 0adb601f3c
commit 2fcb40d5a9
161 changed files with 2169 additions and 4818 deletions

View File

@@ -1,20 +0,0 @@
## Syntax highlighting for Dockerfiles
syntax "dockerfile" "Dockerfile[^/]*$" "\.dockerfile$"
## Keywords
color keyword (i) "^(FROM|MAINTAINER|RUN|CMD|LABEL|EXPOSE|ENV|ADD|COPY|ENTRYPOINT|VOLUME|USER|WORKDIR|ONBUILD|ARG|HEALTHCHECK|STOPSIGNAL|SHELL)[[:space:]]"
## Brackets & parenthesis
color statement "(\(|\)|\[|\])"
## Double ampersand
color special "&&"
## Comments
color comment (i) "^[[:space:]]*#.*$"
## Strings, single-quoted
color constant.string "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>" "%[qw]\[[^]]*\]" "%[qw]\$[^$]*\$" "%[qw]\^[^^]*\^" "%[qw]![^!]*!"
## Strings, double-quoted
color constant.string ""([^"]|(\\"))*"" "%[QW]?\{[^}]*\}" "%[QW]?\([^)]*\)" "%[QW]?<[^>]*>" "%[QW]?\[[^]]*\]" "%[QW]?\$[^$]*\$" "%[QW]?\^[^^]*\^" "%[QW]?![^!]*!"

View File

@@ -1,15 +0,0 @@
micro syntax files
Copyright (C) 2016+ Zachary Yedidia et al.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

View File

@@ -1,4 +0,0 @@
export
:=
error

View File

@@ -1,41 +1,5 @@
# Micro syntax highlighting files
# Syntax Files
These are the syntax highlighting files for micro. To install them, just
put all the syntax files in `~/.config/micro/syntax`.
They are taken from Nano, specifically from [this repository](https://github.com/scopatz/nanorc).
Micro syntax files are almost identical to Nano's, except for some key differences:
* Micro does not use `icolor`. Instead, for a case insensitive match, use the case insensitive flag (`i`) in the regular expression
* For example, `icolor green ".*"` would become `color green (i) ".*"`
# Using with colorschemes
Not all of these files have been converted to use micro's colorscheme feature. Most of them just hardcode the colors, which
can be problematic depending on the colorscheme you use.
Here is a list of the files that have been converted to properly use colorschemes:
* vi
* go
* c
* d
* markdown
* html
* lua
* swift
* rust
* java
* javascript
* pascal
* python
* ruby
* sh
* git
* tex
* solidity
# License
Because the nano syntax files I have modified are distributed under the GNU GPLv3 license, these files are also distributed
under that license. See [LICENSE](LICENSE).
Here are highlight's syntax files. If you would like to make a new syntax file, you should first check it
with the `syntax_checker.go` program. Just place it in this directory and run the program (`go run syntax_checker.go`)
and it will let you know if there are issues with any of the files in the directory.

View File

@@ -1,44 +0,0 @@
# Apache files
syntax "apacheconf" "httpd\.conf|mime\.types|vhosts\.d\\*|\.htaccess"
color yellow ".+"
color brightcyan "(AcceptMutex|AcceptPathInfo|AccessFileName|Action|AddAlt|AddAltByEncoding|AddAltByType|AddCharset|AddDefaultCharset|AddDescription|AddEncoding)"
color brightcyan "(AddHandler|AddIcon|AddIconByEncoding|AddIconByType|AddInputFilter|AddLanguage|AddModuleInfo|AddOutputFilter|AddOutputFilterByType|AddType|Alias|AliasMatch)"
color brightcyan "(Allow|AllowCONNECT|AllowEncodedSlashes|AllowOverride|Anonymous|Anonymous_Authoritative|Anonymous_LogEmail|Anonymous_MustGiveEmail|Anonymous_NoUserID)"
color brightcyan "(Anonymous_VerifyEmail|AssignUserID|AuthAuthoritative|AuthDBMAuthoritative|AuthDBMGroupFile|AuthDBMType|AuthDBMUserFile|AuthDigestAlgorithm)"
color brightcyan "(AuthDigestDomain|AuthDigestFile|AuthDigestGroupFile|AuthDigestNcCheck|AuthDigestNonceFormat|AuthDigestNonceLifetime|AuthDigestQop|AuthDigestShmemSize)"
color brightcyan "(AuthGroupFile|AuthLDAPAuthoritative|AuthLDAPBindDN|AuthLDAPBindPassword|AuthLDAPCharsetConfig|AuthLDAPCompareDNOnServer|AuthLDAPDereferenceAliases)"
color brightcyan "(AuthLDAPEnabled|AuthLDAPFrontPageHack|AuthLDAPGroupAttribute|AuthLDAPGroupAttributeIsDN|AuthLDAPRemoteUserIsDN|AuthLDAPUrl|AuthName|AuthType|AuthUserFile)"
color brightcyan "(BrowserMatch|BrowserMatchNoCase|BS2000Account|BufferedLogs|CacheDefaultExpire|CacheDirLength|CacheDirLevels|CacheDisable|CacheEnable|CacheExpiryCheck)"
color brightcyan "(CacheFile|CacheForceCompletion|CacheGcClean|CacheGcDaily|CacheGcInterval|CacheGcMemUsage|CacheGcUnused|CacheIgnoreCacheControl|CacheIgnoreHeaders)"
color brightcyan "(CacheIgnoreNoLastMod|CacheLastModifiedFactor|CacheMaxExpire|CacheMaxFileSize|CacheMinFileSize|CacheNegotiatedDocs|CacheRoot|CacheSize|CacheTimeMargin)"
color brightcyan "(CGIMapExtension|CharsetDefault|CharsetOptions|CharsetSourceEnc|CheckSpelling|ChildPerUserID|ContentDigest|CookieDomain|CookieExpires|CookieLog|CookieName)"
color brightcyan "(CookieStyle|CookieTracking|CoreDumpDirectory|CustomLog|Dav|DavDepthInfinity|DavLockDB|DavMinTimeout|DefaultIcon|DefaultLanguage|DefaultType)"
color brightcyan "(DeflateBufferSize|DeflateCompressionLevel|DeflateFilterNote|DeflateMemLevel|DeflateWindowSize|Deny|Directory|DirectoryIndex|DirectoryMatch|DirectorySlash)"
color brightcyan "(DocumentRoot|DumpIOInput|DumpIOOutput|EnableExceptionHook|EnableMMAP|EnableSendfile|ErrorDocument|ErrorLog|Example|ExpiresActive|ExpiresByType)"
color brightcyan "(ExpiresDefault|ExtendedStatus|ExtFilterDefine|ExtFilterOptions|FileETag|Files|FilesMatch|ForceLanguagePriority|ForceType|ForensicLog|Group|Header)"
color brightcyan "(HeaderName|HostnameLookups|IdentityCheck|IfDefine|IfModule|IfVersion|ImapBase|ImapDefault|ImapMenu|Include|IndexIgnore|IndexOptions|IndexOrderDefault)"
color brightcyan "(ISAPIAppendLogToErrors|ISAPIAppendLogToQuery|ISAPICacheFile|ISAPIFakeAsync|ISAPILogNotSupported|ISAPIReadAheadBuffer|KeepAlive|KeepAliveTimeout)"
color brightcyan "(LanguagePriority|LDAPCacheEntries|LDAPCacheTTL|LDAPConnectionTimeout|LDAPOpCacheEntries|LDAPOpCacheTTL|LDAPSharedCacheFile|LDAPSharedCacheSize)"
color brightcyan "(LDAPTrustedCA|LDAPTrustedCAType|Limit|LimitExcept|LimitInternalRecursion|LimitRequestBody|LimitRequestFields|LimitRequestFieldSize|LimitRequestLine)"
color brightcyan "(LimitXMLRequestBody|Listen|ListenBackLog|LoadFile|LoadModule|Location|LocationMatch|LockFile|LogFormat|LogLevel|MaxClients|MaxKeepAliveRequests)"
color brightcyan "(MaxMemFree|MaxRequestsPerChild|MaxRequestsPerThread|MaxSpareServers|MaxSpareThreads|MaxThreads|MaxThreadsPerChild|MCacheMaxObjectCount|MCacheMaxObjectSize)"
color brightcyan "(MCacheMaxStreamingBuffer|MCacheMinObjectSize|MCacheRemovalAlgorithm|MCacheSize|MetaDir|MetaFiles|MetaSuffix|MimeMagicFile|MinSpareServers|MinSpareThreads)"
color brightcyan "(MMapFile|ModMimeUsePathInfo|MultiviewsMatch|NameVirtualHost|NoProxy|NumServers|NWSSLTrustedCerts|NWSSLUpgradeable|Options|Order|PassEnv|PidFile)"
color brightcyan "(ProtocolEcho|Proxy|ProxyBadHeader|ProxyBlock|ProxyDomain|ProxyErrorOverride|ProxyIOBufferSize|ProxyMatch|ProxyMaxForwards|ProxyPass|ProxyPassReverse)"
color brightcyan "(ProxyPreserveHost|ProxyReceiveBufferSize|ProxyRemote|ProxyRemoteMatch|ProxyRequests|ProxyTimeout|ProxyVia|ReadmeName|Redirect|RedirectMatch)"
color brightcyan "(RedirectPermanent|RedirectTemp|RemoveCharset|RemoveEncoding|RemoveHandler|RemoveInputFilter|RemoveLanguage|RemoveOutputFilter|RemoveType|RequestHeader)"
color brightcyan "(Require|RewriteBase|RewriteCond|RewriteEngine|RewriteLock|RewriteLog|RewriteLogLevel|RewriteMap|RewriteOptions|RewriteRule|RLimitCPU|RLimitMEM|RLimitNPROC)"
color brightcyan "(Satisfy|ScoreBoardFile|Script|ScriptAlias|ScriptAliasMatch|ScriptInterpreterSource|ScriptLog|ScriptLogBuffer|ScriptLogLength|ScriptSock|SecureListen)"
color brightcyan "(SendBufferSize|ServerAdmin|ServerAlias|ServerLimit|ServerName|ServerPath|ServerRoot|ServerSignature|ServerTokens|SetEnv|SetEnvIf|SetEnvIfNoCase|SetHandler)"
color brightcyan "(SetInputFilter|SetOutputFilter|SSIEndTag|SSIErrorMsg|SSIStartTag|SSITimeFormat|SSIUndefinedEcho|SSLCACertificateFile|SSLCACertificatePath)"
color brightcyan "(SSLCARevocationFile|SSLCARevocationPath|SSLCertificateChainFile|SSLCertificateFile|SSLCertificateKeyFile|SSLCipherSuite|SSLEngine|SSLMutex|SSLOptions)"
color brightcyan "(SSLPassPhraseDialog|SSLProtocol|SSLProxyCACertificateFile|SSLProxyCACertificatePath|SSLProxyCARevocationFile|SSLProxyCARevocationPath|SSLProxyCipherSuite)"
color brightcyan "(SSLProxyEngine|SSLProxyMachineCertificateFile|SSLProxyMachineCertificatePath|SSLProxyProtocol|SSLProxyVerify|SSLProxyVerifyDepth|SSLRandomSeed|SSLRequire)"
color brightcyan "(SSLRequireSSL|SSLSessionCache|SSLSessionCacheTimeout|SSLUserName|SSLVerifyClient|SSLVerifyDepth|StartServers|StartThreads|SuexecUserGroup|ThreadLimit)"
color brightcyan "(ThreadsPerChild|ThreadStackSize|TimeOut|TraceEnable|TransferLog|TypesConfig|UnsetEnv|UseCanonicalName|User|UserDir|VirtualDocumentRoot)"
color brightcyan "(VirtualDocumentRootIP|VirtualHost|VirtualScriptAlias|VirtualScriptAliasIP|Win32DisableAcceptEx|XBitHack)"
color yellow "<[^>]+>"
color brightcyan "</?[A-Za-z]+"
color brightcyan "(<|</|>)"
color green "\"(\\.|[^\"])*\""
color white "#.*"

View File

@@ -1,116 +0,0 @@
## FILENAME: arduino.nanorc
##
## DESCRIPTION: The arduino.nanorc syntax files allows syntax highlighting
## for Arduino sketch files in the GNU nano text editor.
##
## Maintainer: Nicholas Wilde
## Version: 0.1
## DATE: 06/23/2011
##
## HOMEPAGE: http://code.google.com/p/arduino-nano-editor-syntax/
##
## COMMENTS: -Most of the code was taken from the c.nanorc code found with
## GNU nano 2.2.6.
## -Direction was taken from the arduino vim syntax code by johannes
## <https://bitbucket.org/johannes/arduino-vim-syntax/>
## -Tested on Ubuntu Server 11.04 Natty Narwhal and GNU nano 2.2.6
##
## DIRECTIONS: For Ubuntu Server 11.04 Natty Narwhal:
## -Move this file <arduino.nanorc> to the nano directory
## /usr/share/nano/
## -Add arduino.nanorc reference to the nanorc settings file
## /etc/nanorc
## ...
## ## Arduino
## /usr/share/nano/arduino.nanorc
## ...
syntax "ino" "\.?ino$"
##
color brightred "\<[A-Z_][0-9A-Z_]+\>"
##
color green "\<((s?size)|((u_?)?int(8|16|32|64|ptr)))_t\>"
## Constants
green (i) "\<(HIGH|LOW|INPUT|OUTPUT)\>"
## Serial Print
red (i) "\<(DEC|BIN|HEX|OCT|BYTE)\>"
## PI Constants
green (i) "\<(PI|HALF_PI|TWO_PI)\>"
## ShiftOut
green (i) "\<(LSBFIRST|MSBFIRST)\>"
## Attach Interrupt
green (i) "\<(CHANGE|FALLING|RISING)\>"
## Analog Reference
green (i) "\<(DEFAULT|EXTERNAL|INTERNAL|INTERNAL1V1|INTERNAL2V56)\>"
## === FUNCTIONS === ##
## Data Types
color green "\<(boolean|byte|char|float|int|long|word)\>"
## Control Structions
color brightyellow "\<(case|class|default|do|double|else|false|for|if|new|null|private|protected|public|short|signed|static|String|switch|this|throw|try|true|unsigned|void|while)\>"
color magenta "\<(goto|continue|break|return)\>"
## Math
color brightyellow "\<(abs|acos|asin|atan|atan2|ceil|constrain|cos|degrees|exp|floor|log|map|max|min|radians|random|randomSeed|round|sin|sq|sqrt|tan)\>"
## Bits & Bytes
color brightyellow "\<(bitRead|bitWrite|bitSet|bitClear|bit|highByte|lowByte)\>"
## Analog I/O
color brightyellow "\<(analogReference|analogRead|analogWrite)\>"
## External Interrupts
color brightyellow "\<(attachInterrupt|detachInterrupt)\>"
## Time
color brightyellow "\<(delay|delayMicroseconds|millis|micros)\>"
## Digital I/O
color brightyellow "\<(pinMode|digitalWrite|digitalRead)\>"
## Interrupts
color brightyellow "\<(interrupts|noInterrupts)\>"
## Advanced I/O
color brightyellow "\<(noTone|pulseIn|shiftIn|shiftOut|tone)\>"
## Serial
color magenta "\<(Serial|Serial1|Serial2|Serial3|begin|end|peek|read|print|println|available|flush)\>"
## Structure
color brightyellow "\<(setup|loop)\>"
##
color brightcyan "^[[:space:]]*#[[:space:]]*(define|include(_next)?|(un|ifn?)def|endif|el(if|se)|if|warning|error|pragma)"
##
color brightmagenta "'([^']|(\\["'abfnrtv\\]))'" "'\\(([0-3]?[0-7]{1,2}))'" "'\\x[0-9A-Fa-f]{1,2}'"
## GCC builtins
color cyan "__attribute__[[:space:]]*\(\([^)]*\)\)" "__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__"
## String highlighting. You will in general want your comments and
## strings to come last, because syntax highlighting rules will be
## applied in the order they are read in.
color brightyellow "<[^= ]*>" ""(\\.|[^"])*""
## This string is VERY resource intensive!
color brightyellow start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*""
## Comments
color brightblue "//.*"
color brightblue start="/\*" end="\*/"
## Trailing whitespace
color ,green "[[:space:]]+$"

View File

@@ -1,47 +0,0 @@
syntax "asciidoc" "\.(asc|asciidoc|adoc)$"
# main header
color red "^====+$"
# h1
color red "^==[[:space:]].*$"
color red "^----+$"
# h2
color magenta "^===[[:space:]].*$"
color magenta "^~~~~+$"
# h4
color green "^====[[:space:]].*$"
color green "^\^\^\^\^+$"
# h5
color brightblue "^=====[[:space:]].*$"
color brightblue "^\+\+\+\++$"
# attributes
color brightgreen ":.*:"
color brightred "\{[a-z0-9]*\}"
color red "\\\{[a-z0-9]*\}"
color red "\+\+\+\{[a-z0-9]*\}\+\+\+"
# Paragraph Title
color yellow "^\..*$"
# source
color magenta "^\[(source,.+|NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]"
# Other markup
color yellow ".*[[:space:]]\+$"
color yellow "_[^_]+_"
color yellow "\*[^\*]+\*"
color yellow "\+[^\+]+\+"
color yellow "`[^`]+`"
color yellow "\^[^\^]+\^"
color yellow "~[^~]+~"
color yellow "'[^']+'"
color cyan "`{1,2}[^']+'{1,2}"
# bullets
color brightmagenta "^[[:space:]]*[\*\.-]{1,5}[[:space:]]"
# anchors
color brightwhite "\[\[.*\]\]"
color brightwhite "<<.*>>"

View File

@@ -0,0 +1,33 @@
filetype: asciidoc
detect:
filename: "\\.(asc|asciidoc|adoc)$"
rules:
- red: "^====+$"
- red: "^==[[:space:]].*$"
- red: "^----+$"
- magenta: "^===[[:space:]].*$"
- magenta: "^~~~~+$"
- green: "^====[[:space:]].*$"
- green: "^\\^\\^\\^\\^+$"
- brightblue: "^=====[[:space:]].*$"
- brightblue: "^\\+\\+\\+\\++$"
- brightgreen: ":.*:"
- brightred: "\\{[a-z0-9]*\\}"
- red: "\\\\\\{[a-z0-9]*\\}"
- red: "\\+\\+\\+\\{[a-z0-9]*\\}\\+\\+\\+"
- yellow: "^\\..*$"
- magenta: "^\\[(source,.+|NOTE|TIP|IMPORTANT|WARNING|CAUTION)\\]"
- yellow: ".*[[:space:]]\\+$"
- yellow: "_[^_]+_"
- yellow: "\\*[^\\*]+\\*"
- yellow: "\\+[^\\+]+\\+"
- yellow: "`[^`]+`"
- yellow: "\\^[^\\^]+\\^"
- yellow: "~[^~]+~"
- yellow: "'[^']+'"
- cyan: "`{1,2}[^']+'{1,2}"
- brightmagenta: "^[[:space:]]*[\\*\\.-]{1,5}[[:space:]]"
- brightwhite: "\\[\\[.*\\]\\]"
- brightwhite: "<<.*>>"

View File

@@ -1,93 +0,0 @@
## Made by Nickolay Ilyushin <nickolay02@inbox.ru>. Next line is from previous (first) version (no need for modifications :P)
syntax "asm" "\.(S|s|asm)$"
# This file is made for NASM assembly
## Instructions
# x86
color statement "\b(?i)(mov|aaa|aad|aam|aas|adc|add|and|call|cbw|clc|cld|cli|cmc|cmp|cmpsb|cmpsw|cwd|daa|das|dec|div|esc|hlt|idiv|imul|in|inc|int|into|iret|ja|jae|jb|jbe|jc|je|jg|jge|jl|jle|jna|jnae|jnb|jnbe|jnc|jne|jng|jnge|jnl|jnle|jno|jnp|jns|jnz|jo|jp|jpe|jpo|js|jz|jcxz|jmp|lahf|lds|lea|les|lock|lodsb|lodsw|loop|loope|loopne|loopnz|loopz|movsb|movsw|mul|neg|nop|or|pop|popf|push|pushf|rcl|rcr|rep|repe|repne|repnz|repz|ret|retn|retf|rol|ror|sahf|sal|sar|sbb|scasb|scasw|shl|shr|stc|std|sti|stosb|stosw|sub|test|wait|xchg|xlat|xor)(?-i)\b"
color statement "\b(?i)(bound|enter|ins|leave|outs|popa|pusha)(?-i)\b"
color statement "\b(?i)(arpl|clts|lar|lgdt|lidt|lldt|lmsw|loadall|lsl|ltr|sgdt|sidt|sldt|smsw|str|verr|verw)(?-i)\b"
color statement "\b(?i)(bsf|bsr|bt|btc|btr|bts|cdq|cmpsd|cwde|insd|iret|iretd|iretf|jecxz|lfs|lgs|lss|lodsd|loopw|loopew|loopnew|loopnzw|loopzw|loopd|looped|loopned|loopnzd|loopzd|cr|tr|dr|movsd|movsx|movzx|outsd|popad|popfd|pushad|pushfd|scasd|seta|setae|setb|setbe|setc|sete|setg|setge|setl|setle|setna|setnae|setnb|setnbe|setnc|setne|setng|setnge|setnl|setnle|setno|setnp|setns|setnz|seto|setp|setpe|setpo|sets|setz|shdl|shrd|stosd)(?-i)\b"
color statement "\b(?i)(bswap|cmpxcgh|invd|invlpg|wbinvd|xadd)(?-i)\b"
color statement "\b(?i)(cpuid|cmpxchg8b|rdmsr|rdtsc|wrmsr|rsm)(?-i)\b"
color statement "\b(?i)(rdpmc)(?-i)\b"
color statement "\b(?i)(syscall|sysret)(?-i)\b"
color statement "\b(?i)(cmova|cmovae|cmovb|cmovbe|cmovc|cmove|cmovg|cmovge|cmovl|cmovle|cmovna|cmovnae|cmovnb|cmovnbe|cmovnc|cmovne|cmovng|cmovnge|cmovnle|cmovno|cmovpn|cmovns|cmovnz|cmovo|cmovp|cmovpe|cmovpo|cmovs|cmovz|sysenter|sysexit|ud2)(?-i)\b"
color statement "\b(?i)(maskmovq|movntps|movntq|prefetch0|prefetch1|prefetch2|prefetchnta|sfence)(?-i)\b"
color statement "\b(?i)(clflush|lfence|maskmovdqu|mfence|movntdq|movnti|movntpd|pause)(?-i)\b"
color statement "\b(?i)(monitor|mwait)(?-i)\b"
color statement "\b(?i)(cdqe|cqo|cmpsq|cmpxchg16b|iretq|jrcxz|lodsq|movsdx|popfq|pushfq|rdtscp|scasq|stosq|swapgs)(?-i)\b"
color statement "\b(?i)(clgi|invlpga|skinit|stgi|vmload|vmmcall|vmrun|vmsave)(?-i)\b"
color statement "\b(?i)(vmptrdl|vmptrst|vmclear|vmread|vmwrite|vmcall|vmlaunch|vmresume|vmxoff|vmxon)(?-i)\b"
color statement "\b(?i)(lzcnt|popcnt)(?-i)\b"
color statement "\b(?i)(bextr|blcfill|blci|blcic|blcmask|blcs|blsfill|blsic|t1mskc|tzmsk)(?-i)\b"
# x87
color statement "\b(?i)(f2xm1|fabs|fadd|faddp|fbld|fbstp|fchs|fclex|fcom|fcomp|fcompp|fdecstp|fdisi|fdiv|fvidp|fdivr|fdivrp|feni|ffree|fiadd|ficom|ficomp|fidiv|fidivr|fild|fimul|fincstp|finit|fist|fistp|fisub|fisubr|fld|fld1|fldcw|fldenv|fldenvw|fldl2e|fldl2t|fldlg2|fldln2|fldpi|fldz|fmul|fmulp|fnclex|fndisi|fneni|fninit|fnop|fnsave|fnsavenew|fnstcw|fnstenv|fnstenvw|fnstsw|fpatan|fprem|fptan|frndint|frstor|frstorw|fsave|fsavew|fscale|fsqrt|fst|fstcw|fstenv|fstenvw|fstp|fstpsw|fsub|fsubp|fsubr|fsubrp|ftst|fwait|fxam|fxch|fxtract|fyl2x|fyl2xp1)(?-i)\b"
color statement "\b(?i)(fsetpm)(?-i)\b"
color statement "\b(?i)(fcos|fldenvd|fsaved|fstenvd|fprem1|frstord|fsin|fsincos|fstenvd|fucom|fucomp|fucompp)(?-i)\b"
color statement "\b(?i)(fcmovb|fcmovbe|fcmove|fcmove|fcmovnb|fcmovnbe|fcmovne|fcmovnu|fcmovu)(?-i)\b"
color statement "\b(?i)(fcomi|fcomip|fucomi|fucomip)(?-i)\b"
color statement "\b(?i)(fxrstor|fxsave)(?-i)\b"
color statement "\b(?i)(fisttp)(?-i)\b"
color statement "\b(?i)(ffreep)(?-i)\b"
# SIMD
color statement "\b(?i)(emms|movd|movq|packssdw|packsswb|packuswb|paddb|paddw|paddd|paddsb|paddsw|paddusb|paddusw|pand|pandn|por|pxor|pcmpeqb|pcmpeqw|pcmpeqd|pcmpgtb|pcmpgtw|pcmpgtd|pmaddwd|pmulhw|pmullw|psllw|pslld|psllq|psrad|psraw|psrlw|psrld|psrlq|psubb|psubw|psubd|psubsb|psubsw|psubusb|punpckhbw|punpckhwd|punpckhdq|punkcklbw|punpckldq|punpcklwd)(?-i)\b"
color statement "\b(?i)(paveb|paddsiw|pmagw|pdistib|psubsiw|pmwzb|pmulhrw|pmvnzb|pmvlzb|pmvgezb|pmulhriw|pmachriw)(?-i)\b"
color statement "\b(?i)(femms|pavgusb|pf2id|pfacc|pfadd|pfcmpeq|pfcmpge|pfcmpgt|pfmax|pfmin|pfmul|pfrcp|pfrcpit1|pfrcpit2|pfrsqit1|pfrsqrt|pfsub|pfsubr|pi2fd|pmulhrw|prefetch|prefetchw)(?-i)\b"
color statement "\b(?i)(pf2iw|pfnacc|pfpnacc|pi2fw|pswapd)(?-i)\b"
color statement "\b(?i)(pfrsqrtv|pfrcpv)(?-i)\b"
color statement "\b(?i)(addps|addss|cmpps|cmpss|comiss|cvtpi2ps|cvtps2pi|cvtsi2ss|cvtss2si|cvttps2pi|cvttss2si|divps|divss|ldmxcsr|maxps|maxss|minps|minss|movaps|movhlps|movhps|movlhps|movlps|movmskps|movntps|movss|movups|mulps|mulss|rcpps|rcpss|rsqrtps|rsqrtss|shufps|sqrtps|sqrtss|stmxcsr|subps|subss|ucomiss|unpckhps|unpcklps)(?-i)\b"
color statement "\b(?i)(andnps|andps|orps|pavgb|pavgw|pextrw|pinsrw|pmaxsw|pmaxub|pminsw|pminub|pmovmskb|pmulhuw|psadbw|pshufw|xorps)(?-i)\b"
color statement "\b(?i)(movups|movss|movlps|movhlps|movlps|unpcklps|unpckhps|movhps|movlhps|prefetchnta|prefetch0|prefetch1|prefetch2|nop|movaps|cvtpi2ps|cvtsi2ss|cvtps2pi|cvttss2si|cvtps2pi|cvtss2si|ucomiss|comiss|sqrtps|sqrtss|rsqrtps|rsqrtss|rcpps|andps|orps|xorps|addps|addss|mulps|mulss|subps|subss|minps|minss|divps|divss|maxps|maxss|pshufw|ldmxcsr|stmxcsr|sfence|cmpps|cmpss|pinsrw|pextrw|shufps|pmovmskb|pminub|pmaxub|pavgb|pavgw|pmulhuw|movntq|pminsw|pmaxsw|psadbw|maskmovq)(?-i)\b"
color statement "\b(?i)(addpd|addsd|addnpd|cmppd|cmpsd)(?-i)\b"
color statement "\b(?i)(addpd|addsd|andnpd|andpd|cmppd|cmpsd|comisd|cvtdq2pd|cvtdq2ps|cvtpd2dq|cvtpd2pi|cvtpd2ps|cvtpi2pd|cvtps2dq|cvtps2pd|cvtsd2si|cvtsd2ss|cvtsi2sd|cvtss2sd|cvttpd2dq|cvttpd2pi|cvttps2dq|cvttsd2si|divpd|divsd|maxpd|maxsd|minpd|minsd|movapd|movhpd|movlpd|movmskpd|movsd|movupd|mulpd|mulsd|orpd|shufpd|sqrtpd|sqrtsd|subpd|subsd|ucomisd|unpckhpd|unpcklpd|xorpd)(?-i)\b"
color statement "\b(?i)(movdq2q|movdqa|movdqu|movq2dq|paddq|psubq|pmuludq|pshufhw|pshuflw|pshufd|pslldq|psrldq|punpckhqdq|punpcklqdq)(?-i)\b"
color statement "\b(?i)(addsubpd|addsubps|haddpd|haddps|hsubpd|hsubps|movddup|movshdup|movsldu)(?-i)\b"
color statement "\b(?i)(lddqu)(?-i)\b"
color statement "\b(?i)(psignw|psignd|psignb|pshufb|pmulhrsw|pmaddubsw|phsubw|phsubsw|phsubd|phaddw|phaddsw|phaddd|palignr|pabsw|pabsd|pabsb)(?-i)\b"
color statement "\b(?i)(dpps|dppd|blendps|blendpd|blendvps|blendvpd|roundps|roundss|roundpd|roundsd|insertps|extractps)(?-i)\b"
color statement "\b(?i)(mpsadbw|phminposuw|pmulld|pmuldq|pblendvb|pblendw|pminsb|pmaxsb|pminuw|pmaxuw|pminud|pmaxud|pminsd|pmaxsd|pinsrb|pinsrd/pinsrq|pextrb|pextrw|pextrd/pextrq|pmovsxbw|pmovzxbw|pmovsxbd|pmovzxbd|pmovsxbq|pmovzxbq|pmovsxwd|pmovzxwd|pmovsxwq|pmovzxwq|pmovsxdq|pmovzxdq|ptest|pcmpeqq|packusdw|movntdqa)(?-i)\b"
color statement "\b(?i)(extrq|insertq|movntsd|movntss)(?-i)\b"
color statement "\b(?i)(crc32|pcmpestri|pcmpestrm|pcmpistri|pcmpistrm|pcmpgtq)(?-i)\b"
color statement "\b(?i)(vfmaddpd|vfmaddps|vfmaddsd|vfmaddss|vfmaddsubpd|vfmaddsubps|vfmsubaddpd|vfmsubaddps|vfmsubpd|vfmsubps|vfmsubsd|vfmsubss|vfnmaddpd|vfnmaddps|vfnmaddsd|vfnmaddss|vfnmsubps|vfnmsubsd|vfnmsubss)(?-i)\b"
# Crypto
color statement "\b(?i)(aesenc|aesenclast|aesdec|aesdeclast|aeskeygenassist|aesimc)(?-i)\b"
color statement "\b(?i)(sha1rnds4|sha1nexte|sha1msg1|sha1msg2|sha256rnds2|sha256msg1|sha256msg2)(?-i)\b"
# Undocumented
color statement "\b(?i)(aam|aad|salc|icebp|loadall|loadalld|ud1)(?-i)\b"
## Registers
color identifier "\b(?i)(al|ah|bl|bh|cl|ch|dl|dh|bpl|sil|r8b|r9b|r10b|r11b|dil|spl|r12b|r13b|r14b|r15)(?-i)\b"
color identifier "\b(?i)(cw|sw|tw|fp_ds|fp_opc|fp_ip|fp_dp|fp_cs|cs|ss|ds|es|fs|gs|gdtr|idtr|tr|ldtr|ax|bx|cx|dx|bp|si|r8w|r9w|r10w|r11w|di|sp|r12w|r13w|r14w|r15w|ip)(?-i)\b"
color identifier "\b(?i)(fp_dp|fp_ip|eax|ebx|ecx|edx|ebp|esi|r8d|r9d|r10d|r11d|edi|esp|r12d|r13d|r14d|r15d|eip|eflags|mxcsr)(?-i)\b"
color identifier "\b(?i)(mm0|mm1|mm2|mm3|mm4|mm5|mm6|mm7|rax|rbx|rcx|rdx|rbp|rsi|r8|r9|r10|r11|rdi|rsp|r12|r13|r14|r15|rip|rflags|cr0|cr1|cr2|cr3|cr4|cr5|cr6|cr7|cr8|cr9|cr10|cr11|cr12|cr13|cr14|cr15|msw|dr0|dr1|dr2|dr3|r4|dr5|dr6|dr7|dr8|dr9|dr10|dr11|dr12|dr13|dr14|dr15)(?-i)\b"
color identifier "\b(?i)(st0|st1|st2|st3|st4|st5|st6|st7)(?-i)\b"
color identifier "\b(?i)(xmm0|xmm1|xmm2|xmm3|xmm4|xmm5|xmm6|xmm7|xmm8|xmm9|xmm10|xmm11|xmm12|xmm13|xmm14|xmm15)(?-i)\b"
color identifier "\b(?i)(ymm0|ymm1|ymm2|ymm3|ymm4|ymm5|ymm6|ymm7|ymm8|ymm9|ymm10|ymm11|ymm12|ymm13|ymm14|ymm15)(?-i)\b"
color identifier "\b(?i)(zmm0|zmm1|zmm2|zmm3|zmm4|zmm5|zmm6|zmm7|zmm8|zmm9|zmm10|zmm11|zmm12|zmm13|zmm14|zmm15|zmm16|zmm17|zmm18|zmm19|zmm20|zmm21|zmm22|zmm23|zmm24|zmm25|zmm26|zmm27|zmm28|zmm29|zmm30|zmm31)(?-i)\b"
## Constants
# Number - it works
color constant.number "\b(|h|A|0x)+[0-9]+(|h|A)+\b"
color constant.number "\b0x[0-9 a-f A-F]+\b"
## Preprocessor (NASM)
color preproc "%+(\+|\?|\?\?|)[a-z A-Z 0-9]+"
color preproc "%\[[. a-z A-Z 0-9]*\]"
## Other
color statement "\b(?i)(extern|global|section|segment|_start|\.text|\.data|\.bss)(?-i)\b"
color statement "\b(?i)(db|dw|dd|dq|dt|ddq|do)(?-i)\b"
color identifier "[a-z A-Z 0-9 _]+:"
# String
color constant.string ""(\\.|[^"])*""
color constant.string "'(\\.|[^'])*'"
## Comments
color comment ";.*"

View File

@@ -1,25 +0,0 @@
syntax "awk" "\.awk$"
header "^#!.*bin/(env +)?awk( |$)"
color brightyellow "\$[A-Za-z0-9_!@#$*?-]+"
color brightyellow "\<(ARGC|ARGIND|ARGV|BINMODE|CONVFMT|ENVIRON|ERRNO|FIELDWIDTHS)\>"
color brightyellow "\<(FILENAME|FNR|FS|IGNORECASE|LINT|NF|NR|OFMT|OFS|ORS)\>"
color brightyellow "\<(PROCINFO|RS|RT|RSTART|RLENGTH|SUBSEP|TEXTDOMAIN)\>"
color brightblue "\<(function|extension|BEGIN|END)\>"
color red "[-+*/%^|!=&<>?;:]|\\|\[|\]"
color cyan "\<(for|if|while|do|else|in|delete|exit)\>"
color cyan "\<(break|continue|return)\>"
color brightblue "\<(close|getline|next|nextfile|print|printf|system|fflush)\>"
color brightblue "\<(atan2|cos|exp|int|log|rand|sin|sqrt|srand)\>"
color brightblue "\<(asort|asorti|gensub|gsub|index|length|match)\>"
color brightblue "\<(split|sprintf|strtonum|sub|substr|tolower|toupper)\>"
color brightblue "\<(mktime|strftime|systime)\>"
color brightblue "\<(and|compl|lshift|or|rshift|xor)\>"
color brightblue "\<(bindtextdomain|dcgettext|dcngettext)\>"
color magenta "/.*[^\\]/"
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color magenta "\\."
color brightblack "(^|[[:space:]])#([^{].*)?$"
color brightwhite,cyan "TODO:?"
color ,green "[[:space:]]+$"
color ,red " + +| + +"

View File

@@ -1,41 +0,0 @@
## Here is an example for C++.
##
syntax "c++" "\.c(c|pp|xx)$" "\.h(h|pp|xx)$" "\.ii?$" "\.(def)$"
color identifier "\b[A-Z_][0-9A-Z_]+\b"
color type "\b(auto|float|double|bool|char|int|short|long|sizeof|enum|void|static|const|constexpr|struct|union|typedef|extern|(un)?signed|inline)\b"
color type "\b((s?size)|((u_?)?int(8|16|32|64|ptr)))_t\b"
color statement "\b(class|namespace|template|public|protected|private|typename|this|friend|virtual|using|mutable|volatile|register|explicit)\b"
color statement "\b(for|if|while|do|else|case|default|switch)\b"
color statement "\b(try|throw|catch|operator|new|delete)\b"
color statement "\b(goto|continue|break|return)\b"
color preproc "^[[:space:]]*#[[:space:]]*(define|pragma|include|(un|ifn?)def|endif|el(if|se)|if|warning|error)"
color constant "'([^'\\]|(\\["'abfnrtv\\]))'" "'\\(([0-3]?[0-7]{1,2}))'" "'\\x[0-9A-Fa-f]{1,2}'"
##
## GCC builtins
color statement "__attribute__[[:space:]]*\(\([^)]*\)\)" "__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__"
#Operator Color
color statement "[.:;,+*|=!\%]" "<" ">" "/" "-" "&"
#Parenthetical Color
# color magenta "[(){}]" "\[" "\]"
color constant.number "\b[0-9]+\b" "\b0x[0-9A-Fa-f]+\b"
color constant.number "\b(true|false)\b" "NULL"
##
## String highlighting. You will in general want your brightblacks and
## strings to come last, because syntax highlighting rules will be
## applied in the order they are read in.
color constant.string ""(\\.|[^"])*""
##
## This string is VERY resource intensive!
#color cyan start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*""
## Comment highlighting
color comment "//.*"
color comment start="/\*" end="\*/"
## Trailing whitespace
#color ,green "[[:space:]]+$"

View File

@@ -1,41 +0,0 @@
## Here is an example for C.
##
syntax "c" "\.(c|C)$" "\.(h|H)$" "\.ii?$" "\.(def)$"
color identifier "\b[A-Z_][0-9A-Z_]+\b"
color type "\b(float|double|char|int|short|long|sizeof|enum|void|static|const|struct|union|typedef|extern|(un)?signed|inline)\b"
color type "\b((s?size)|((u_?)?int(8|16|32|64|ptr)))_t\b"
color statement "\b(typename|mutable|volatile|register|explicit)\b"
color statement "\b(for|if|while|do|else|case|default|switch)\b"
color statement "\b(try|throw|catch|operator|new|delete)\b"
color statement "\b(goto|continue|break|return)\b"
color preproc "^[[:space:]]*#[[:space:]]*(define|pragma|include|(un|ifn?)def|endif|el(if|se)|if|warning|error)"
color constant "'([^'\\]|(\\["'abfnrtv\\]))'" "'\\(([0-3]?[0-7]{1,2}))'" "'\\x[0-9A-Fa-f]{1,2}'"
##
## GCC builtins
color statement "__attribute__[[:space:]]*\(\([^)]*\)\)" "__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__"
#Operator Color
color statement "[.:;,+*|=!\%]" "<" ">" "/" "-" "&"
#Parenthetical Color
# color magenta "[(){}]" "\[" "\]"
color constant.number "\b[0-9]+\b" "\b0x[0-9A-Fa-f]+\b"
color constant.number "NULL"
##
## String highlighting. You will in general want your brightblacks and
## strings to come last, because syntax highlighting rules will be
## applied in the order they are read in.
color constant.string ""(\\.|[^"])*""
##
## This string is VERY resource intensive!
#color cyan start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*""
## Comment highlighting
color comment "//.*"
color comment start="/\*" end="\*/"
## Trailing whitespace
#color ,green "[[:space:]]+$"

47
runtime/syntax/c.yaml Normal file
View File

@@ -0,0 +1,47 @@
filetype: c
detect:
filename: "(\\.(c|C)$|\\.(h|H)$|\\.ii?$|\\.(def)$)"
rules:
- identifier: "\\b[A-Z_][0-9A-Z_]+\\b"
- type: "\\b(float|double|char|int|short|long|sizeof|enum|void|static|const|struct|union|typedef|extern|(un)?signed|inline)\\b"
- type: "\\b((s?size)|((u_?)?int(8|16|32|64|ptr)))_t\\b"
- statement: "\\b(typename|mutable|volatile|register|explicit)\\b"
- statement: "\\b(for|if|while|do|else|case|default|switch)\\b"
- statement: "\\b(try|throw|catch|operator|new|delete)\\b"
- statement: "\\b(goto|continue|break|return)\\b"
- preproc: "^[[:space:]]*#[[:space:]]*(define|pragma|include|(un|ifn?)def|endif|el(if|se)|if|warning|error)"
- constant: "'([^'\\\\]|(\\\\[\"'abfnrtv\\\\]))'"
- constant: "'\\\\(([0-3]?[0-7]{1,2}))'"
- constant: "'\\\\x[0-9A-Fa-f]{1,2}'"
# GCC builtins
- statement: "__attribute__[[:space:]]*\\(\\([^)]*\\)\\)"
- statement: "__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__"
# Operator Color
- statement: "([.:;,+*|=!\\%]|<|>|/|-|&)"
- constant.number: "(\\b[0-9]+\\b|\\b0x[0-9A-Fa-f]+\\b)"
- constant.number: "NULL"
- constant.string:
start: "\""
end: "\""
rules:
- constant.specialChar: "\\\\."
- constant.string:
start: "'"
end: "'"
rules:
- preproc: "..+"
- constant.specialChar: "\\\\."
- comment:
start: "//"
end: "$"
rules: []
- comment:
start: "/\\*"
end: "\\*/"
rules: []

View File

@@ -1,13 +0,0 @@
syntax "caddyfile" "Caddyfile"
color identifier "^\s*\S+(\s|$)"
color type "^([\w.:/-]+,? ?)+[,{]$"
color constant.specialChar "\s{$"
color constant.specialChar "^\s*}$"
color constant.string start="\"" end="\""
color preproc "\{(\w+|\$\w+|%\w+%)\}"
color comment "#.*"
# extra and trailing spaces
color ,red "([[:space:]]{2,}|\t){$"
color ,red "[[:space:]]+$"

View File

@@ -1,23 +0,0 @@
## CMake syntax highlighter for GNU Nano
##
syntax "cmake" "(CMakeLists\.txt|\.cmake)$"
green (i) "^[[:space:]]*[A-Z0-9_]+"
brightyellow (i) "^[[:space:]]*(include|include_directories|include_external_msproject)\>"
brightgreen (i) "^[[:space:]]*\<((else|end)?if|else|(end)?while|(end)?foreach|break)\>"
color brightgreen "\<(COPY|NOT|COMMAND|PROPERTY|POLICY|TARGET|EXISTS|IS_(DIRECTORY|ABSOLUTE)|DEFINED)\>[[:space:]]"
color brightgreen "[[:space:]]\<(OR|AND|IS_NEWER_THAN|MATCHES|(STR|VERSION_)?(LESS|GREATER|EQUAL))\>[[:space:]]"
brightred (i) "^[[:space:]]*\<((end)?(function|macro)|return)"
#String Color
color cyan "['][^']*[^\\][']" "[']{3}.*[^\\][']{3}"
color cyan "["][^"]*[^\\]["]" "["]{3}.*[^\\]["]{3}"
brightred (i) start="\$(\{|ENV\{)" end="\}"
color magenta "\<(APPLE|UNIX|WIN32|CYGWIN|BORLAND|MINGW|MSVC(_IDE|60|71|80|90)?)\>"
brightblue (i) "^([[:space:]]*)?#.*"
brightblue (i) "[[:space:]]#.*"

View File

@@ -1,16 +0,0 @@
syntax "coffeescript" "\.coffee$"
header "^#!.*/(env +)?coffee"
color red "[!&|=/*+-<>]|\<(and|or|is|isnt|not)\>"
color brightblue "[A-Za-z_][A-Za-z0-9_]*:[[:space:]]*(->|\()" "->"
color brightblue "[()]"
color cyan "\<(for|of|continue|break|isnt|null|unless|this|else|if|return)\>"
color cyan "\<(try|catch|finally|throw|new|delete|typeof|in|instanceof)\>"
color cyan "\<(debugger|switch|while|do|class|extends|super)\>"
color cyan "\<(undefined|then|unless|until|loop|of|by|when)\>"
color brightcyan "\<(true|false|yes|no|on|off)\>"
color brightyellow "@[A-Za-z0-9_]*"
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color brightblack "(^|[[:space:]])#([^{].*)?$"
color ,green "[[:space:]]+$"
color ,red " + +| + +"

View File

@@ -1,17 +0,0 @@
syntax "colortest" "ColorTest$"
color black "\<PLAIN\>"
color red "\<red\>"
color green "\<green\>"
color yellow "\<yellow\>"
color blue "\<blue\>"
color magenta "\<magenta\>"
color cyan "\<cyan\>"
color brightred "\<brightred\>"
color brightgreen "\<brightgreen\>"
color brightyellow "\<brightyellow\>"
color brightblue "\<brightblue\>"
color brightmagenta "\<brightmagenta\>"
color brightcyan "\<brightcyan\>"

View File

@@ -0,0 +1,19 @@
filetype: colortest
detect:
filename: "ColorTest$"
rules:
- black: "\\bPLAIN\\b"
- red: "\\bred\\b"
- green: "\\bgreen\\b"
- yellow: "\\byellow\\b"
- blue: "\\bblue\\b"
- magenta: "\\bmagenta\\b"
- cyan: "\\bcyan\\b"
- brightred: "\\bbrightred\\b"
- brightgreen: "\\bbrightgreen\\b"
- brightyellow: "\\bbrightyellow\\b"
- brightblue: "\\bbrightblue\\b"
- brightmagenta: "\\bbrightmagenta\\b"
- brightcyan: "\\bbrightcyan\\b"

View File

@@ -1,10 +0,0 @@
## Here is an example for nanorc files.
##
syntax "conf" "\.c[o]?nf$"
## Possible errors and parameters
## Strings
color constant.string (i) ""(\\.|[^"])*""
## Comments
color comment (i) "^[[:space:]]*#.*$"
color comment (i) "^[[:space:]]*##.*$"

View File

@@ -1,18 +0,0 @@
##
## Syntax highlighting for conkyrc files.
##
##
syntax "conky" "(\.*conkyrc.*$|conky.conf)"
## Configuration items
color green "\<(alignment|append_file|background|border_inner_margin|border_outer_margin|border_width|color0|color1|color2|color3|color4|color5|color6|color7|color8|color9|colorN|cpu_avg_samples|default_bar_height|default_bar_width|default_color|default_gauge_height|default_gauge_width|default_graph_height|default_graph_width|default_outline_color|default_shade_color|diskio_avg_samples|display|double_buffer|draw_borders|draw_graph_borders|draw_outline|draw_shades|extra_newline|font|format_human_readable|gap_x|gap_y|http_refresh|if_up_strictness|imap|imlib_cache_flush_interval|imlib_cache_size|lua_draw_hook_post|lua_draw_hook_pre|lua_load|lua_shutdown_hook|lua_startup_hook|mail_spool|max_port_monitor_connections|max_text_width|max_user_text|maximum_width|minimum_height|minimum_width|mpd_host|mpd_password|mpd_port|music_player_interval|mysql_host|mysql_port|mysql_user|mysql_password|mysql_db|net_avg_samples|no_buffers|nvidia_display|out_to_console|out_to_http|out_to_ncurses|out_to_stderr|out_to_x|override_utf8_locale|overwrite_file|own_window|own_window_class|own_window_colour|own_window_hints|own_window_title|own_window_transparent|own_window_type|pad_percents|pop3|sensor_device|short_units|show_graph_range|show_graph_scale|stippled_borders|temperature_unit|template|template0|template1|template2|template3|template4|template5|template6|template7|template8|template9|text|text_buffer_size|times_in_seconds|top_cpu_separate|top_name_width|total_run_times|update_interval|update_interval_on_battery|uppercase|use_spacer|use_xft|xftalpha|xftfont)\>"
## Configuration item constants
color yellow "\<(above|below|bottom_left|bottom_right|bottom_middle|desktop|dock|no|none|normal|override|skip_pager|skip_taskbar|sticky|top_left|top_right|top_middle|middle_left|middle_right|middle_middle|undecorated|yes)\>"
## Variables
color brightblue "\<(acpiacadapter|acpifan|acpitemp|addr|addrs|alignc|alignr|apcupsd|apcupsd_cable|apcupsd_charge|apcupsd_lastxfer|apcupsd_linev|apcupsd_load|apcupsd_loadbar|apcupsd_loadgauge|apcupsd_loadgraph|apcupsd_model|apcupsd_name|apcupsd_status|apcupsd_temp|apcupsd_timeleft|apcupsd_upsmode|apm_adapter|apm_battery_life|apm_battery_time|audacious_bar|audacious_bitrate|audacious_channels|audacious_filename|audacious_frequency|audacious_length|audacious_length_seconds|audacious_main_volume|audacious_playlist_length|audacious_playlist_position|audacious_position|audacious_position_seconds|audacious_status|audacious_title|battery|battery_bar|battery_percent|battery_short|battery_time|blink|bmpx_album|bmpx_artist|bmpx_bitrate|bmpx_title|bmpx_track|bmpx_uri|buffers|cached|cmdline_to_pid|color|color0|color1|color2|color3|color4|color5|color6|color7|color8|color9|combine|conky_build_arch|conky_build_date|conky_version|cpu|cpubar|cpugauge|cpugraph|curl|desktop|desktop_name|desktop_number|disk_protect|diskio|diskio_read|diskio_write|diskiograph|diskiograph_read|diskiograph_write|distribution|downspeed|downspeedf|downspeedgraph|draft_mails|else|endif|entropy_avail|entropy_bar|entropy_perc|entropy_poolsize|eval|eve|exec|execbar|execgauge|execgraph|execi|execibar|execigauge|execigraph|execp|execpi|flagged_mails|font|format_time|forwarded_mails|freq|freq_g|fs_bar|fs_bar_free|fs_free|fs_free_perc|fs_size|fs_type|fs_used|fs_used_perc|goto|gw_iface|gw_ip|hddtemp|head|hr|hwmon|i2c|i8k_ac_status|i8k_bios|i8k_buttons_status|i8k_cpu_temp|i8k_left_fan_rpm|i8k_left_fan_status|i8k_right_fan_rpm|i8k_right_fan_status|i8k_serial|i8k_version|ibm_brightness|ibm_fan|ibm_temps|ibm_volume|ical|iconv_start|iconv_stop|if_empty|if_existing|if_gw|if_match|if_mixer_mute|if_mounted|if_mpd_playing|if_running|if_smapi_bat_installed|if_up|if_updatenr|if_xmms2_connected|image|imap_messages|imap_unseen|ioscheduler|irc|kernel|laptop_mode|lines|loadavg|loadgraph|lua|lua_bar|lua_gauge|lua_graph|lua_parse|machine|mails|mboxscan|mem|memwithbuffers|membar|memwithbuffersbar|memeasyfree|memfree|memgauge|memgraph|memmax|memperc|mixer|mixerbar|mixerl|mixerlbar|mixerr|mixerrbar|moc_album|moc_artist|moc_bitrate|moc_curtime|moc_file|moc_rate|moc_song|moc_state|moc_timeleft|moc_title|moc_totaltime|monitor|monitor_number|mpd_album|mpd_artist|mpd_bar|mpd_bitrate|mpd_elapsed|mpd_file|mpd_length|mpd_name|mpd_percent|mpd_random|mpd_repeat|mpd_smart|mpd_status|mpd_title|mpd_track|mpd_vol|mysql|nameserver|new_mails|nodename|nodename_short|no_update|nvidia|obsd_product|obsd_sensors_fan|obsd_sensors_temp|obsd_sensors_volt|obsd_vendor|offset|outlinecolor|pb_battery|pid_chroot|pid_cmdline|pid_cwd|pid_environ|pid_environ_list|pid_exe|pid_nice|pid_openfiles|pid_parent|pid_priority|pid_state|pid_state_short|pid_stderr|pid_stdin|pid_stdout|pid_threads|pid_thread_list|pid_time_kernelmode|pid_time_usermode|pid_time|pid_uid|pid_euid|pid_suid|pid_fsuid|pid_gid|pid_egid|pid_sgid|pid_fsgid|pid_read|pid_vmpeak|pid_vmsize|pid_vmlck|pid_vmhwm|pid_vmrss|pid_vmdata|pid_vmstk|pid_vmexe|pid_vmlib|pid_vmpte|pid_write|platform|pop3_unseen|pop3_used|processes|read_tcp|read_udp|replied_mails|rss|running_processes|running_threads|scroll|seen_mails|shadecolor|smapi|smapi_bat_bar|smapi_bat_perc|smapi_bat_power|smapi_bat_temp|sony_fanspeed|stippled_hr|stock|swap|swapbar|swapfree|swapmax|swapperc|sysname|tab|tail|tcp_ping|tcp_portmon|template0|template1|template2|template3|template4|template5|template6|template7|template8|template9|texeci|texecpi|threads|time|to_bytes|top|top_io|top_mem|top_time|totaldown|totalup|trashed_mails|tztime|gid_name|uid_name|unflagged_mails|unforwarded_mails|unreplied_mails|unseen_mails|updates|upspeed|upspeedf|upspeedgraph|uptime|uptime_short|user_names|user_number|user_terms|user_times|user_time|utime|voffset|voltage_mv|voltage_v|weather|wireless_ap|wireless_bitrate|wireless_essid|wireless_link_bar|wireless_link_qual|wireless_link_qual_max|wireless_link_qual_perc|wireless_mode|words|xmms2_album|xmms2_artist|xmms2_bar|xmms2_bitrate|xmms2_comment|xmms2_date|xmms2_duration|xmms2_elapsed|xmms2_genre|xmms2_id|xmms2_percent|xmms2_playlist|xmms2_size|xmms2_smart|xmms2_status|xmms2_timesplayed|xmms2_title|xmms2_tracknr|xmms2_url)\>"
color brightblue "\$\{?[0-9A-Z_!@#$*?-]+\}?"
color cyan "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
color brightred "^TEXT$"

51
runtime/syntax/cpp.yaml Normal file
View File

@@ -0,0 +1,51 @@
filetype: c++
detect:
filename: "(\\.c(c|pp|xx)$|\\.h(h|pp|xx)$|\\.ii?$|\\.(def)$)"
rules:
- identifier: "\\b[A-Z_][0-9A-Z_]+\\b"
- type: "\\b(auto|float|double|bool|char|int|short|long|sizeof|enum|void|static|const|constexpr|struct|union|typedef|extern|(un)?signed|inline)\\b"
- type: "\\b((s?size)|((u_?)?int(8|16|32|64|ptr)))_t\\b"
- statement: "\\b(class|namespace|template|public|protected|private|typename|this|friend|virtual|using|mutable|volatile|register|explicit)\\b"
- statement: "\\b(for|if|while|do|else|case|default|switch)\\b"
- statement: "\\b(try|throw|catch|operator|new|delete)\\b"
- statement: "\\b(goto|continue|break|return)\\b"
- preproc: "^[[:space:]]*#[[:space:]]*(define|pragma|include|(un|ifn?)def|endif|el(if|se)|if|warning|error)"
- constant: "('([^'\\\\]|(\\\\[\"'abfnrtv\\\\]))'|'\\\\(([0-3]?[0-7]{1,2}))'|'\\\\x[0-9A-Fa-f]{1,2}')"
##
## GCC builtins
- statement: "(__attribute__[[:space:]]*\\(\\([^)]*\\)\\)|__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__)"
#Operator Color
- statement: "([.:;,+*|=!\\%]|<|>|/|-|&)"
- constant.number: "(\\b[0-9]+\\b|\\b0x[0-9A-Fa-f]+\\b)"
- constant.number: "(\\b(true|false)\\b|NULL)"
- constant.string:
start: "\""
end: "\""
rules:
- constant.specialChar: "\\\\."
- constant.string:
start: "'"
end: "'"
rules:
- preproc: "..+"
- constant.specialChar: "\\\\."
- comment:
start: "//"
end: "$"
rules:
- todo: "(TODO|XXX|FIXME):?"
- comment:
start: "/\\*"
end: "\\*/"
rules:
- todo: "(TODO|XXX|FIXME):?"

View File

@@ -1,34 +0,0 @@
## Crystal Syntax file.
##
syntax "crystal" "\.cr$" "Gemfile" "config.ru" "Rakefile" "Capfile" "Vagrantfile"
header "^#!.*/(env +)?crystal( |$)"
## Asciibetical list of reserved words
color statement "\b(BEGIN|END|abstract|alias|and|begin|break|case|class|def|defined\?|do|else|elsif|end|ensure|enum|false|for|fun|if|in|include|lib|loop|macro|module|next|nil|not|of|or|pointerof|private|protected|raise|redo|require|rescue|retry|return|self|sizeof|spawn|struct|super|then|true|type|undef|union|uninitialized|unless|until|when|while|yield)\b"
## Constants
color constant "(\$|@|@@)?\b[A-Z]+[0-9A-Z_a-z]*"
color constant.number "\b[0-9]+\b"
## Crystal "symbols"
color constant (i) "([ ]|^):[0-9A-Z_]+\b"
## Some unique things we want to stand out
color constant "\b(__FILE__|__LINE__)\b"
## Regular expressions
color constant "/([^/]|(\\/))*/[iomx]*" "%r\{([^}]|(\\}))*\}[iomx]*"
## Shell command expansion is in `backticks` or like %x{this}. These are
## "double-quotish" (to use a perlism).
color constant.string "`[^`]*`" "%x\{[^}]*\}"
## Strings, double-quoted
color constant.string ""([^"]|(\\"))*"" "%[QW]?\{[^}]*\}" "%[QW]?\([^)]*\)" "%[QW]?<[^>]*>" "%[QW]?\[[^]]*\]" "%[QW]?\$[^$]*\$" "%[QW]?\^[^^]*\^" "%[QW]?![^!]*!"
## Expression substitution. These go inside double-quoted strings,
## "like #{this}".
color special "#\{[^}]*\}"
## Characters are single-quoted
color constant.string.char "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>" "%[qw]\[[^]]*\]" "%[qw]\$[^$]*\$" "%[qw]\^[^^]*\^" "%[qw]![^!]*!"
## Comments
color comment "#[^{].*$" "#$"
color comment "##[^{].*$" "##$"
## "Here" docs
color constant start="<<-?'?EOT'?" end="^EOT"
## Some common markers
color todo "(XXX|TODO|FIXME|\?\?\?)"

View File

@@ -1,26 +0,0 @@
syntax "c#" "\.cs$"
# Class
color brightmagenta "class +[A-Za-z0-9]+ *((:) +[A-Za-z0-9.]+)?"
# Annotation
color magenta "@[A-Za-z]+"
color brightblue "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[()]"
color green "\<(bool|byte|sbyte|char|decimal|double|float|IntPtr|int|uint|long|ulong|object|short|ushort|string|base|this|var|void)\>"
color cyan "\<(alias|as|case|catch|checked|default|do|dynamic|else|finally|fixed|for|foreach|goto|if|is|lock|new|null|return|switch|throw|try|unchecked|while)\>"
color cyan "\<(abstract|async|class|const|delegate|enum|event|explicit|extern|get|implicit|in|internal|interface|namespace|operator|out|override|params|partial|private|protected|public|readonly|ref|sealed|set|sizeof|stackalloc|static|struct|typeof|unsafe|using|value|virtual|volatile|yield)\>"
# LINQ-only keywords (ones that cannot be used outside of a LINQ query - lots others can)
color cyan "\<(from|where|select|group|info|orderby|join|let|in|on|equals|by|ascending|descending)\>"
color brightred "\<(break|continue)\>"
color brightcyan "\<(true|false)\>"
color red "[-+/*=<>?:!~%&|]"
color blue "\<([0-9._]+|0x[A-Fa-f0-9_]+|0b[0-1_]+)[FL]?\>"
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color magenta "\\([btnfr]|'|\"|\\)"
color magenta "\\u[A-Fa-f0-9]{4}"
color brightblack "(^|[[:space:]])//.*"
color brightblack start="/\*" end="\*/"
color brightwhite,cyan "TODO:?"
color ,green "[[:space:]]+$"
color ,red " + +| + +"

File diff suppressed because one or more lines are too long

42
runtime/syntax/css.yaml Normal file

File diff suppressed because one or more lines are too long

View File

@@ -1,30 +0,0 @@
## Cython nanorc, based off of Python nanorc.
##
syntax "cython" "\.pyx$" "\.pxd$" "\.pyi$"
brightred (i) "def [ 0-9A-Z_]+"
brightred (i) "cpdef [0-9A-Z_]+\(.*\):"
brightred (i) "cdef cppclass [ 0-9A-Z_]+\(.*\):"
# Python Keyword Color
color green "\<(and|as|assert|class|def|DEF|del|elif|ELIF|else|ELSE|except|exec|finally|for|from|global|if|IF|import|in|is|lambda|map|not|or|pass|print|raise|try|while|with|yield)\>"
color brightmagenta "\<(continue|break|return)\>"
# Cython Keyword Color
color green "\<(cdef|cimport|cpdef|cppclass|ctypedef|extern|include|namespace|property|struct)\>"
color red "\<(bint|char|double|int|public|void|unsigned)\>"
#Operator Color
color yellow "[.:;,+*|=!\%]" "<" ">" "/" "-" "&"
#Parenthetical Color
color magenta "[(){}]" "\[" "\]"
#String Color
color cyan "['][^']*[^\\][']" "[']{3}.*[^\\][']{3}"
color cyan "["][^"]*[^\\]["]" "["]{3}.*[^\\]["]{3}"
color cyan start=""""[^"]" end=""""" start="'''[^']" end="'''"
# Comment Color
color brightblue "#.*$"

View File

@@ -1,91 +0,0 @@
## D syntax highlighting for GNU nano
##
## Author: Andrei Vinokurov
## Based on D lexer specification (http://dlang.org/lex)
syntax "d" "\.(d(i|d)?)$"
## Operators and punctuation
color statement "(\*|/|%|\+|-|>>|<<|>>>|&|\^(\^)?|\||~)?="
color statement "\.\.(\.)?|!|\*|&|~|\(|\)|\[|\]|\\|/|\+|-|%|<|>|\?|:|;"
## Octal integer literals are deprecated
color error "(0[0-7_]*)(L[uU]?|[uU]L?)?"
## Decimal integer literals
color constant.number "([0-9]|[1-9][0-9_]*)(L[uU]?|[uU]L?)?"
## Binary integer literals
color constant "(0[bB][01_]*)(L[uU]?|[uU]L?)?"
## Decimal float literals
color constant.number "[0-9][0-9_]*\.([0-9][0-9_]*)([eE][+-]?([0-9][0-9_]*))?[fFL]?i?"
color constant.number "[0-9][0-9_]*([eE][+-]?([0-9][0-9_]*))[fFL]?i?"
color constant.number "[^.]\.([0-9][0-9_]*)([eE][+-]?([0-9][0-9_]*))?[fFL]?i?"
color constant.number "[0-9][0-9_]*([fFL]?i|[fF])"
## Hexadecimal integer literals
color constant.number "(0[xX]([0-9a-fA-F][0-9a-fA-F_]*|[0-9a-fA-F_]*[0-9a-fA-F]))(L[uU]?|[uU]L?)?"
## Hexadecimal float literals
color constant.number "0[xX]([0-9a-fA-F][0-9a-fA-F_]*|[0-9a-fA-F_]*[0-9a-fA-F])(\.[0-9a-fA-F][0-9a-fA-F_]*|[0-9a-fA-F_]*[0-9a-fA-F])?[pP][+-]?([0-9][0-9_]*)[fFL]?i?"
color constant.number "0[xX]\.([0-9a-fA-F][0-9a-fA-F_]*|[0-9a-fA-F_]*[0-9a-fA-F])[pP][+-]?([0-9][0-9_]*)[fFL]?i?"
## Character literals
color constant.string "'([^\']|\\(['"?\abfnrtv]|x[[:xdigit:]]{2}|[0-7]{1,3}|u[[:xdigit:]]{4}|U[[:xdigit:]]{8}|&.*;))'"
## Keywords
## a-e
color statement "\b(abstract|alias|align|asm|assert|auto|body|break|case|cast|catch|class|const|continue|debug|default|delegate|do|else|enum|export|extern)\b"
## f-l
color statement "\b(false|final|finally|for|foreach|foreach_reverse|function|goto|if|immutable|import|in|inout|interface|invariant|is|lazy)\b"
## m-r
color statement "\b(macro|mixin|module|new|nothrow|null|out|override|package|pragma|private|protected|public|pure|ref|return)\b"
## s-w
color statement "\b(scope|shared|static|struct|super|switch|synchronized|template|this|throw|true|try|typeid|typeof|union|unittest|version|while|with)\b"
## __
color statement "\b(__FILE__|__MODULE__|__LINE__|__FUNCTION__|__PRETTY_FUNCTION__|__gshared|__traits|__vector|__parameters)\b"
## Deprecated keywords
color error "\b(delete|deprecated|typedef|volatile)\b"
## Primitive types
color type "\b(bool|byte|cdouble|cent|cfloat|char|creal|dchar|double|float|idouble|ifloat|int|ireal|long|real|short|ubyte|ucent|uint|ulong|ushort|void|wchar)\b"
## Globally defined symbols
color type "\b(string|wstring|dstring|size_t|ptrdiff_t)\b"
## Special tokens
color constant "\b(__DATE__|__EOF__|__TIME__|__TIMESTAMP__|__VENDOR__|__VERSION__)\b"
## String literals
## TODO: multiline backtick and doublequote string. (Unlikely possible at all with nano.)
### DoubleQuotedString
color constant.string ""(\\.|[^"])*""
### WysiwygString
color constant.string start="r"" end="""
color constant.string "`[^`]*`"
### HexString
color constant.string "x"([[:space:]]*[[:xdigit:]][[:space:]]*[[:xdigit:]])*[[:space:]]*""
### DelimitedString
color constant.string "q"\(.*\)""
color constant.string "q"\{.*\}""
color constant.string "q"\[.*\]""
color constant.string "q"<.*>""
color constant.string start="q"[^({[<"][^"]*$" end="^[^"]+""
color constant.string "q"([^({[<"]).*""
### TokenString
### True token strings require nesting, so, again, they can't be implemented accurately here.
### At the same time, the intended purpose of token strings makes it questionable to highlight them as strings at all.
## color ,magenta start="q\{" end="\}"
## Comments
## NB: true nested brightblacks are impossible to implement with plain regex
color comment "//.*"
color comment start="/\*" end="\*/"
color comment start="/\+" end="\+/"

118
runtime/syntax/d.yaml Normal file
View File

@@ -0,0 +1,118 @@
filetype: d
detect:
filename: "\\.(d(i|d)?)$"
rules:
# Operators and punctuation
- statement: "(\\*|/|%|\\+|-|>>|<<|>>>|&|\\^(\\^)?|\\||~)?="
- statement: "\\.\\.(\\.)?|!|\\*|&|~|\\(|\\)|\\[|\\]|\\\\|/|\\+|-|%|<|>|\\?|:|;"
# Octal integer literals are deprecated
- error: "(0[0-7_]*)(L[uU]?|[uU]L?)?"
# Decimal integer literals
- constant.number: "([0-9]|[1-9][0-9_]*)(L[uU]?|[uU]L?)?"
# Binary integer literals
- constant: "(0[bB][01_]*)(L[uU]?|[uU]L?)?"
# Decimal float literals
- constant.number: "[0-9][0-9_]*\\.([0-9][0-9_]*)([eE][+-]?([0-9][0-9_]*))?[fFL]?i?"
- constant.number: "[0-9][0-9_]*([eE][+-]?([0-9][0-9_]*))[fFL]?i?"
- constant.number: "[^.]\\.([0-9][0-9_]*)([eE][+-]?([0-9][0-9_]*))?[fFL]?i?"
- constant.number: "[0-9][0-9_]*([fFL]?i|[fF])"
# Hexadecimal integer literals
- constant.number: "(0[xX]([0-9a-fA-F][0-9a-fA-F_]*|[0-9a-fA-F_]*[0-9a-fA-F]))(L[uU]?|[uU]L?)?"
# Hexadecimal float literals
- constant.number: "0[xX]([0-9a-fA-F][0-9a-fA-F_]*|[0-9a-fA-F_]*[0-9a-fA-F])(\\.[0-9a-fA-F][0-9a-fA-F_]*|[0-9a-fA-F_]*[0-9a-fA-F])?[pP][+-]?([0-9][0-9_]*)[fFL]?i?"
- constant.number: "0[xX]\\.([0-9a-fA-F][0-9a-fA-F_]*|[0-9a-fA-F_]*[0-9a-fA-F])[pP][+-]?([0-9][0-9_]*)[fFL]?i?"
# Character literals
- constant.string:
start: "'"
end: "'"
rules:
- constant.specialChar: "\\\\."
# Keywords
# a-e
- statement: "\\b(abstract|alias|align|asm|assert|auto|body|break|case|cast|catch|class|const|continue|debug|default|delegate|do|else|enum|export|extern)\\b"
# f-l
- statement: "\\b(false|final|finally|for|foreach|foreach_reverse|function|goto|if|immutable|import|in|inout|interface|invariant|is|lazy)\\b"
# m-r
- statement: "\\b(macro|mixin|module|new|nothrow|null|out|override|package|pragma|private|protected|public|pure|ref|return)\\b"
# s-w
- statement: "\\b(scope|shared|static|struct|super|switch|synchronized|template|this|throw|true|try|typeid|typeof|union|unittest|version|while|with)\\b"
# __
- statement: "\\b(__FILE__|__MODULE__|__LINE__|__FUNCTION__|__PRETTY_FUNCTION__|__gshared|__traits|__vector|__parameters)\\b"
# Deprecated keywords
- error: "\\b(delete|deprecated|typedef|volatile)\\b"
# Primitive types
- type: "\\b(bool|byte|cdouble|cent|cfloat|char|creal|dchar|double|float|idouble|ifloat|int|ireal|long|real|short|ubyte|ucent|uint|ulong|ushort|void|wchar)\\b"
# Globally defined symbols
- type: "\\b(string|wstring|dstring|size_t|ptrdiff_t)\\b"
# Special tokens
- constant: "\\b(__DATE__|__EOF__|__TIME__|__TIMESTAMP__|__VENDOR__|__VERSION__)\\b"
# String literals
# DoubleQuotedString
- constant.string:
start: "\""
end: "\""
rules:
- constant.specialChar: "\\\\."
# WysiwygString
- constant.string:
start: "r\""
end: "\""
rules:
- constant.specialChar: "\\\\."
- constant.string:
start: "`"
end: "`"
rules:
- constant.specialChar: "\\\\."
# HexString
- constant.string:
start: "x\""
end: "\""
rules:
- constant.specialChar: "\\\\."
# DelimitedString
- constant.string:
start: "q\"\\("
end: "\\)\""
rules:
- constant.specialChar: "\\\\."
- constant.string:
start: "q\"\\{"
end: "q\"\\}"
rules:
- constant.specialChar: "\\\\."
- constant.string:
start: "q\"\\["
end: "q\"\\]"
rules:
- constant.specialChar: "\\\\."
- constant.string:
start: "q\"<"
end: "q\">"
rules:
- constant.specialChar: "\\\\."
- constant.string:
start: "q\"[^({[<\"][^\"]*$"
end: "^[^\"]+\""
rules:
- constant.specialChar: "\\\\."
- constant.string:
start: "q\"([^({[<\"])"
end: "\""
rules:
- constant.specialChar: "\\\\."
# Comments
- comment:
start: "//"
end: "$"
rules: []
- comment:
start: "/\\*"
end: "\\*/"
rules: []
- comment:
start: "/\\+"
end: "\\+/"
rules: []

View File

@@ -1,19 +0,0 @@
syntax "dart" "\.dart$"
color constant.number "\b[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\b"
color constant.number "\b[-+]?([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?"
color constant.number "\b[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?"
color identifier "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]"
color statement "\b(break|case|catch|continue|default|else|finally)\b"
color statement "\b(for|function|get|if|in|as|is|new|return|set|switch|final|await|async|sync)\b"
color statement "\b(switch|this|throw|try|var|void|while|with|import|library|part|const|export)\b"
color constant "\b(true|false|null)\b"
color type "\b(List|String)\b"
color type "\b(int|num|double|bool)\b"
color statement "[-+/*=<>!~%?:&|]"
color constant "/[^*]([^/]|(\\/))*[^\\]/[gim]*"
color constant "\\[0-7][0-7]?[0-7]?|\\x[0-9a-fA-F]+|\\[bfnrt'"\?\\]"
color comment "(^|[[:space:]])//.*"
color comment "/\*.+\*/"
color todo "TODO:?"
color constant.string ""(\\.|[^"])*"|'(\\.|[^'])*'"

43
runtime/syntax/dart.yaml Normal file
View File

@@ -0,0 +1,43 @@
filetype: dart
detect:
filename: "\\.dart$"
rules:
- constant.number: "\\b[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\\b"
- constant.number: "\\b[-+]?([0-9]+\\.[0-9]*|[0-9]*\\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?"
- constant.number: "\\b[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?"
- identifier: "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]"
- statement: "\\b(break|case|catch|continue|default|else|finally)\\b"
- statement: "\\b(for|function|get|if|in|as|is|new|return|set|switch|final|await|async|sync)\\b"
- statement: "\\b(switch|this|throw|try|var|void|while|with|import|library|part|const|export)\\b"
- constant: "\\b(true|false|null)\\b"
- type: "\\b(List|String)\\b"
- type: "\\b(int|num|double|bool)\\b"
- statement: "[-+/*=<>!~%?:&|]"
- constant: "/[^*]([^/]|(\\\\/))*[^\\\\]/[gim]*"
- constant: "\\\\[0-7][0-7]?[0-7]?|\\\\x[0-9a-fA-F]+|\\\\[bfnrt'\"\\?\\\\]"
- comment:
start: "//"
end: "$"
rules:
- todo: "TODO:?"
- comment:
start: "/\\*"
end: "\\*/"
rules:
- todo: "TODO:?"
- constant.string:
start: "\""
end: "\""
rules:
- constant.specialChar: "\\\\."
- constant.string:
start: "'"
end: "'"
rules:
- constant.specialChar: "\\\\."

View File

@@ -1,8 +0,0 @@
syntax "dot" "\.(dot|gv)$"
color cyan "\<(digraph|edge|graph|node|subgraph)\>"
color magenta "\<(arrowhead|arrowsize|arrowtail|bgcolor|center|color|constraint|decorateP|dir|distortion|fillcolor|fontcolor|fontname|fontsize|headclip|headlabel|height|labelangle|labeldistance|labelfontcolor|labelfontname|labelfontsize|label|layers|layer|margin|mclimit|minlen|name|nodesep|nslimit|ordering|orientation|pagedir|page|peripheries|port_label_distance|rankdir|ranksep|rank|ratio|regular|rotate|samehead|sametail|shapefile|shape|sides|size|skew|style|tailclip|taillabel|URL|weight|width)\>"
color red "=|->|--"
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color brightblack "(^|[[:space:]])//.*"
color brightblack start="/\*" end="\*/"

View File

@@ -1,24 +0,0 @@
## A HTML+Ruby set for Syntax Highlighting .erb files (Embedded RubyRails Views etc) ERB
## (c) 2009, Georgios V. Michalakidis - g.michalakidis@computer.org
## Licensed under the CC (Creative Commons) License.
##
## https://github.com/geomic/ERB-And-More-Code-Highlighting-for-nano
syntax "erb" "\.erb$" "\.rhtml$"
color blue start="<" end=">"
color white start="<%" end="%>"
color red "&[^;[[:space:]]]*;"
color yellow "\<(BEGIN|END|alias|and|begin|break|case|class|def|defined\?|do|else|elsif|end|ensure|false|for|if|in|module|next|nil|not|or|redo|rescue|retry|return|self|super|then|true|undef|unless|until|when|while|yield)\>"
color brightblue "(\$|@|@@)?\<[A-Z]+[0-9A-Z_a-z]*"
magenta (i) "([ ]|^):[0-9A-Z_]+\>"
color brightyellow "\<(__FILE__|__LINE__)\>"
color brightmagenta "!/([^/]|(\\/))*/[iomx]*" "%r\{([^}]|(\\}))*\}[iomx]*"
color brightblue "`[^`]*`" "%x\{[^}]*\}"
color green ""([^"]|(\\"))*"" "%[QW]?\{[^}]*\}" "%[QW]?\([^)]*\)" "%[QW]?<[^>]*>" "%[QW]?\[[^]]*\]" "%[QW]?\$[^$]*\$" "%[QW]?\^[^^]*\^" "%[QW]?![^!]*!"
color brightgreen "#\{[^}]*\}"
color green "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>" "%[qw]\[[^]]*\]" "%[qw]\$[^$]*\$" "%[qw]\^[^^]*\^" "%[qw]![^!]*!"
color cyan "#[^{].*$" "#$"
color brightcyan "##[^{].*$" "##$"
color green start="<<-?'?EOT'?" end="^EOT"
color brightcyan "(XXX|TODO|FIXME|\?\?\?)"

View File

@@ -1,35 +0,0 @@
syntax "fish" "\.fish$"
header "^#!.*/(env +)?fish( |$)"
# Numbers
color constant "\b[0-9]+\b"
# Conditionals and control flow
color statement "\b(and|begin|break|case|continue|else|end|for|function|if|in|not|or|return|select|shift|switch|while)\b"
color special "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|^|!|=|&|\|)"
# Fish commands
color type "\b(bg|bind|block|breakpoint|builtin|cd|count|command|commandline|complete|dirh|dirs|echo|emit|eval|exec|exit|fg|fish|fish_config|fish_ident|fish_pager|fish_prompt|fish_right_prompt|fish_update_completions|fishd|funced|funcsave|functions|help|history|jobs|math|mimedb|nextd|open|popd|prevd|psub|pushd|pwd|random|read|set|set_color|source|status|string|trap|type|ulimit|umask|vared)\b"
# Common linux commands
color type "\b((g|ig)?awk|bash|dash|find|\w{0,4}grep|kill|killall|\w{0,4}less|make|pkill|sed|sh|tar)\b"
# Coreutils commands
color type "\b(base64|basename|cat|chcon|chgrp|chmod|chown|chroot|cksum|comm|cp|csplit|cut|date|dd|df|dir|dircolors|dirname|du|env|expand|expr|factor|false|fmt|fold|head|hostid|id|install|join|link|ln|logname|ls|md5sum|mkdir|mkfifo|mknod|mktemp|mv|nice|nl|nohup|nproc|numfmt|od|paste|pathchk|pinky|pr|printenv|printf|ptx|pwd|readlink|realpath|rm|rmdir|runcon|seq|(sha1|sha224|sha256|sha384|sha512)sum|shred|shuf|sleep|sort|split|stat|stdbuf|stty|sum|sync|tac|tail|tee|test|time|timeout|touch|tr|true|truncate|tsort|tty|uname|unexpand|uniq|unlink|users|vdir|wc|who|whoami|yes)\b"
# Conditional flags
color statement "--[a-z-]+"
color statement "\ -[a-z]+"
# Strings
color constant.string ""(\\.|[^"])*""
color constant.string "'(\\.|[^'])*'"
color special """
color special "'"
# Variables
color identifier (i) "\$\{?[0-9A-Z_!@#$*?-]+\}?"
# Comments & TODOs
color comment "(^|[[:space:]])#.*$"
color todo "(TODO|XXX|FIXME):?"

45
runtime/syntax/fish.yaml Normal file
View File

@@ -0,0 +1,45 @@
filetype: fish
detect:
filename: "\\.fish$"
header: "^#!.*/(env +)?fish( |$)"
rules:
# Numbers
- constant: "\\b[0-9]+\\b"
# Conditionals and control flow
- statement: "\\b(and|begin|break|case|continue|else|end|for|function|if|in|not|or|return|select|shift|switch|while)\\b"
- special: "(\\{|\\}|\\(|\\)|\\;|\\]|\\[|`|\\\\|\\$|<|>|^|!|=|&|\\|)"
# Fish commands
- type: "\\b(bg|bind|block|breakpoint|builtin|cd|count|command|commandline|complete|dirh|dirs|echo|emit|eval|exec|exit|fg|fish|fish_config|fish_ident|fish_pager|fish_prompt|fish_right_prompt|fish_update_completions|fishd|funced|funcsave|functions|help|history|jobs|math|mimedb|nextd|open|popd|prevd|psub|pushd|pwd|random|read|set|set_color|source|status|string|trap|type|ulimit|umask|vared)\\b"
# Common linux commands
- type: "\\b((g|ig)?awk|bash|dash|find|\\w{0,4}grep|kill|killall|\\w{0,4}less|make|pkill|sed|sh|tar)\\b"
# Coreutils commands
- type: "\\b(base64|basename|cat|chcon|chgrp|chmod|chown|chroot|cksum|comm|cp|csplit|cut|date|dd|df|dir|dircolors|dirname|du|env|expand|expr|factor|false|fmt|fold|head|hostid|id|install|join|link|ln|logname|ls|md5sum|mkdir|mkfifo|mknod|mktemp|mv|nice|nl|nohup|nproc|numfmt|od|paste|pathchk|pinky|pr|printenv|printf|ptx|pwd|readlink|realpath|rm|rmdir|runcon|seq|(sha1|sha224|sha256|sha384|sha512)sum|shred|shuf|sleep|sort|split|stat|stdbuf|stty|sum|sync|tac|tail|tee|test|time|timeout|touch|tr|true|truncate|tsort|tty|uname|unexpand|uniq|unlink|users|vdir|wc|who|whoami|yes)\\b"
# Conditional flags
- statement: "--[a-z-]+"
- statement: "\\ -[a-z]+"
- identifier: "(?i)\\$\\{?[0-9A-Z_!@#$*?-]+\\}?"
- constant.string:
start: "\""
end: "\""
rules:
- constant.specialChar: "\\\\."
- constant.string:
start: "'"
end: "'"
rules: []
- comment:
start: "#"
end: "$"
rules:
- todo: "(TODO|XXX|FIXME):?"

View File

@@ -1,51 +0,0 @@
## Here is an example for Fortran 90/95
syntax "fortran" "\.([Ff]|[Ff]90|[Ff]95|[Ff][Oo][Rr])$"
#color red "\<[A-Z_]a[0-9A-Z_]+\>"
color red "\<[0-9]+\>"
green (i) "\<(action|advance|all|allocatable|allocated|any|apostrophe)\>"
green (i) "\<(append|asis|assign|assignment|associated|character|common)\>"
green (i) "\<(complex|data|default|delim|dimension|double precision)\>"
green (i) "\<(elemental|epsilon|external|file|fmt|form|format|huge)\>"
green (i) "\<(implicit|include|index|inquire|integer|intent|interface)\>"
green (i) "\<(intrinsic|iostat|kind|logical|module|none|null|only)\>"
green (i) "\<(operator|optional|pack|parameter|pointer|position|private)\>"
green (i) "\<(program|public|real|recl|recursive|selected_int_kind)\>"
green (i) "\<(selected_real_kind|subroutine|status)\>"
cyan (i) "\<(abs|achar|adjustl|adjustr|allocate|bit_size|call|char)\>"
cyan (i) "\<(close|contains|count|cpu_time|cshift|date_and_time)\>"
cyan (i) "\<(deallocate|digits|dot_product|eor|eoshift|function|iachar)\>"
cyan (i) "\<(iand|ibclr|ibits|ibset|ichar|ieor|iolength|ior|ishft|ishftc)\>"
cyan (i) "\<(lbound|len|len_trim|matmul|maxexponent|maxloc|maxval|merge)\>"
cyan (i) "\<(minexponent|minloc|minval|mvbits|namelist|nearest|nullify)\>"
cyan (i) "\<(open|pad|present|print|product|pure|quote|radix)\>"
cyan (i) "\<(random_number|random_seed|range|read|readwrite|replace)\>"
cyan (i) "\<(reshape|rewind|save|scan|sequence|shape|sign|size|spacing)\>"
cyan (i) "\<(spread|sum|system_clock|target|transfer|transpose|trim)\>"
cyan (i) "\<(ubound|unpack|verify|write|tiny|type|use|yes)\>"
yellow (i) "\<(.and.|case|do|else|else?if|else?where|end|end?do|end?if)\>"
yellow (i) "\<(end?select|.eqv.|forall|if|lge|lgt|lle|llt|.neqv.|.not.)\>"
yellow (i) "\<(.or.|repeat|select case|then|where|while)\>"
magenta (i) "\<(continue|cycle|exit|go?to|result|return)\>"
#Operator Color
color yellow "[.:;,+*|=!\%]" "<" ">" "/" "-" "&"
#Parenthetical Color
color magenta "[(){}]" "\[" "\]"
# Add preprocessor commands.
color brightcyan "^[[:space:]]*#[[:space:]]*(define|include|(un|ifn?)def|endif|el(if|se)|if|warning|error)"
## String highlighting.
cyan (i) "<[^= ]*>" ""(\\.|[^"])*""
cyan (i) "<[^= ]*>" "'(\\.|[^"])*'"
## Comment highlighting
brightred (i) "!.*$" "(^[Cc]| [Cc]) .*$"

View File

@@ -1,43 +0,0 @@
## GDScript syntax file, based on Python syntax file.
##
syntax "gdscript" "\.gd$"
## built-in objects
color constant "\b(null|self|true|false)\b"
## built-in attributes
# color constant "\b()\b"
## built-in functions
color identifier "\b(abs|acos|asin|atan|atan2|ceil|clamp|convert|cos|cosh|db2linear|decimals|deg2rad|ease|exp|float|floor|fmod|fposmod|hash|int|isinf|isnan|lerp|linear2db|load|log|max|min|nearest_po2|pow|preload|print|printerr|printraw|prints|printt|rad2deg|rand_range|rand_seed|randomize|randi|randf|range|round|seed|sin|slerp|sqrt|str|str2var|tan|typeof|var2str|weakref)\b"
## special method names
color identifier "\b(AnimationPlayer|AnimationTreePlayer|Button|Control|HTTPClient|HTTPRequest|Input|InputEvent|MainLoop|Node|Node2D|SceneTree|Spatial|SteamPeer|PacketPeer|PacketPeerUDP|Timer|Tween)\b"
## types
color type "\b(Vector2|Vector3)\b"
## definitions
color identifier "func [a-zA-Z_0-9]+"
## keywords
color statement "\b(and|as|assert|break|breakpoint|class|const|continue|elif|else|export|extends|for|func|if|in|map|not|onready|or|pass|return|signal|var|while|yield)\b"
## decorators
color brightgreen "@.*[(]"
## operators
color statement "[.:;,+*|=!\%@]" "<" ">" "/" "-" "&"
## parentheses
color statement "[(){}]" "\[" "\]"
## numbers
color constant "\b[0-9]+\b"
## strings
color constant.number "\b([0-9]+|0x[0-9a-fA-F]*)\b|'.'"
color constant.string ""(\\.|[^"])*"|'(\\.|[^'])*'"
color constant.specialChar "\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})"
color constant.string "`[^`]*`"
## brightblacks
color comment "#.*$"
## block brightblacks
color comment start=""""([^"]|$)" end="""""
color comment start="'''([^']|$)" end="'''"

View File

@@ -1,28 +0,0 @@
## Here is an example for ebuilds/eclasses
##
syntax "ebuild" "\.e(build|class)$"
## All the standard portage functions
color identifier "^src_(unpack|compile|install|test)" "^pkg_(config|nofetch|setup|(pre|post)(inst|rm))"
## Highlight bash related syntax
color statement "\b(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while|continue|break)\b"
color statement "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
color statement "-(e|d|f|r|g|u|w|x|L)\b"
color statement "-(eq|ne|gt|lt|ge|le|s|n|z)\b"
## Highlight variables ... official portage ones in red, all others in bright red
color preproc "\$\{?[a-zA-Z_0-9]+\}?"
color special "\b(ARCH|HOMEPAGE|DESCRIPTION|IUSE|SRC_URI|LICENSE|SLOT|KEYWORDS|FILESDIR|WORKDIR|(P|R)?DEPEND|PROVIDE|DISTDIR|RESTRICT|USERLAND)\b"
color special "\b(S|D|T|PV|PF|P|PN|A)\b" "\bC(XX)?FLAGS\b" "\bLDFLAGS\b" "\bC(HOST|TARGET|BUILD)\b"
## Highlight portage commands
color identifier "\buse(_(with|enable))?\b [!a-zA-Z0-9_+ -]*" "inherit.*"
color statement "\be(begin|end|conf|install|make|warn|infon?|error|log|patch|new(group|user))\b"
color statement "\bdie\b" "\buse(_(with|enable))?\b" "\binherit\b" "\bhas\b" "\b(has|best)_version\b" "\bunpack\b"
color statement "\b(do|new)(ins|s?bin|doc|lib(\.so|\.a)|man|info|exe|initd|confd|envd|pam|menu|icon)\b"
color statement "\bdo(python|sed|dir|hard|sym|html|jar|mo)\b" "\bkeepdir\b"
color statement "prepall(docs|info|man|strip)" "prep(info|lib|lib\.(so|a)|man|strip)"
color statement "\b(doc|ins|exe)into\b" "\bf(owners|perms)\b" "\b(exe|ins|dir)opts\b"
## Highlight common commands used in ebuilds
color type "\bmake\b" "\b(cat|cd|chmod|chown|cp|echo|env|export|grep|let|ln|mkdir|mv|rm|sed|set|tar|touch|unset)\b"
## Highlight comments (doesnt work that well)
color comment "#.*$"
## Highlight strings (doesnt work that well)
color constant.string ""(\\.|[^\"])*"" "'(\\.|[^'])*'"

View File

@@ -0,0 +1,44 @@
filetype: ebuild
detect:
filename: "\\.e(build|class)$"
rules:
# All the standard portage functions
- identifier: "^src_(unpack|compile|install|test)|^pkg_(config|nofetch|setup|(pre|post)(inst|rm))"
# Highlight bash related syntax
- statement: "\\b(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while|continue|break)\\b"
- statement: "(\\{|\\}|\\(|\\)|\\;|\\]|\\[|`|\\\\|\\$|<|>|!|=|&|\\|)"
- statement: "-(e|d|f|r|g|u|w|x|L)\\b"
- statement: "-(eq|ne|gt|lt|ge|le|s|n|z)\\b"
# Highlight variables ... official portage ones in red, all others in bright red
- preproc: "\\$\\{?[a-zA-Z_0-9]+\\}?"
- special: "\\b(ARCH|HOMEPAGE|DESCRIPTION|IUSE|SRC_URI|LICENSE|SLOT|KEYWORDS|FILESDIR|WORKDIR|(P|R)?DEPEND|PROVIDE|DISTDIR|RESTRICT|USERLAND)\\b"
- special: "\\b(S|D|T|PV|PF|P|PN|A)\\b|\\bC(XX)?FLAGS\\b|\\bLDFLAGS\\b|\\bC(HOST|TARGET|BUILD)\\b"
# Highlight portage commands
- identifier: "\\buse(_(with|enable))?\\b [!a-zA-Z0-9_+ -]*|inherit.*"
- statement: "\\be(begin|end|conf|install|make|warn|infon?|error|log|patch|new(group|user))\\b"
- statement: "\\bdie\\b|\\buse(_(with|enable))?\\b|\\binherit\\b|\\bhas\\b|\\b(has|best)_version\\b|\\bunpack\\b"
- statement: "\\b(do|new)(ins|s?bin|doc|lib(\\.so|\\.a)|man|info|exe|initd|confd|envd|pam|menu|icon)\\b"
- statement: "\\bdo(python|sed|dir|hard|sym|html|jar|mo)\\b|\\bkeepdir|\b"
- statement: "prepall(docs|info|man|strip)|prep(info|lib|lib\\.(so|a)|man|strip)"
- statement: "\\b(doc|ins|exe)into\\b|\\bf(owners|perms)\\b|\\b(exe|ins|dir)opts\\b"
# Highlight common commands used in ebuilds
- type: "\\bmake\\b|\\b(cat|cd|chmod|chown|cp|echo|env|export|grep|let|ln|mkdir|mv|rm|sed|set|tar|touch|unset)\\b"
# Highlight comments (doesnt work that well)
- comment:
start: "#"
end: "$"
rules: []
# Highlight strings (doesnt work that well)
- constant.string:
start: "\""
end: "\""
rules:
- constant.specialChar: "\\\\."
- constant.string:
start: "'"
end: "'"
rules:
- constant.specialChar: "\\\\."

View File

@@ -1,19 +0,0 @@
## Here is an example for Portage control files
##
syntax "etc-portage" "\.(keywords|mask|unmask|use)$"
## Base text:
color green "^.+$"
## Use flags:
color brightred "[[:space:]]+\+?[a-zA-Z0-9_-]+"
color brightblue "[[:space:]]+-[a-zA-Z0-9_-]+"
## Likely version numbers:
color magenta "-[[:digit:]].*([[:space:]]|$)"
## Accepted arches:
color white "[~-]?\<(alpha|amd64|arm|hppa|ia64|mips|ppc|ppc64|s390|sh|sparc|x86|x86-fbsd)\>"
color white "[[:space:]][~-]?\*"
## Categories:
color cyan "^[[:space:]]*.*/"
## Masking regulators:
color brightmagenta "^[[:space:]]*(=|~|<|<=|=<|>|>=|=>)"
## Comments:
color yellow "#.*$"

View File

@@ -1,38 +0,0 @@
# This code is free software; you can redistribute it and/or modify it under
# the terms of the new BSD License.
#
# Copyright (c) 2010, Sebastian Staudt
# A nano configuration file to enable syntax highlighting of some Git specific
# files with the GNU nano text editor (http://www.nano-editor.org)
#
syntax "git-commit" "COMMIT_EDITMSG|TAG_EDITMSG"
# Commit message
color ignore ".*"
# Comments
color comment "^#.*"
# Files changes
color keyword "#[[:space:]](deleted|modified|new file|renamed):[[:space:]].*"
color keyword "#[[:space:]]deleted:"
color keyword "#[[:space:]]modified:"
color keyword "#[[:space:]]new file:"
color keyword "#[[:space:]]renamed:"
# Untracked filenames
color error "^# [^/?*:;{}\\]+\.[^/?*:;{}\\]+$"
color keyword "^#[[:space:]]Changes.*[:]"
color keyword "^#[[:space:]]Your branch and '[^']+"
color keyword "^#[[:space:]]Your branch and '"
color keyword "^#[[:space:]]On branch [^ ]+"
color keyword "^#[[:space:]]On branch"
# Recolor hash symbols
# Recolor hash symbols
color special "#"
# Trailing spaces (+LINT is not ok, git uses tabs)
color ,error "[[:space:]]+$"

View File

@@ -0,0 +1,30 @@
filetype: git-commit
detect:
filename: "COMMIT_EDITMSG|TAG_EDITMSG"
rules:
# Commit message
- ignore: ".*"
# Comments
- comment:
start: "#"
end: "$"
rules: []
# File changes
- keyword: "#[[:space:]](deleted|modified|new file|renamed):[[:space:]].*"
- keyword: "#[[:space:]]deleted:"
- keyword: "#[[:space:]]modified:"
- keyword: "#[[:space:]]new file:"
- keyword: "#[[:space:]]renamed:"
# Untracked filenames
- error: "^# [^/?*:;{}\\\\]+\\.[^/?*:;{}\\\\]+$"
- keyword: "^#[[:space:]]Changes.*[:]"
- keyword: "^#[[:space:]]Your branch and '[^']+"
- keyword: "^#[[:space:]]Your branch and '"
- keyword: "^#[[:space:]]On branch [^ ]+"
- keyword: "^#[[:space:]]On branch"
# Recolor hash symbols
- special: "#"
# Trailing spaces (+LINT is not ok, git uses tabs)
- error: "[[:space:]]+$"

View File

@@ -1,7 +0,0 @@
syntax "git-config" "git(config|modules)$|\.git/config$"
color constant "\<(true|false)\>"
color keyword "^[[:space:]]*[^=]*="
color constant "^[[:space:]]*\[.*\]$"
color constant ""(\\.|[^"])*"|'(\\.|[^'])*'"
color comment "(^|[[:space:]])#([^{].*)?$"

View File

@@ -0,0 +1,14 @@
filetype: git-config
detect:
filename: "git(config|modules)$|\\.git/config$"
rules:
- constant: "\\<(true|false)\\>"
- keyword: "^[[:space:]]*[^=]*="
- constant: "^[[:space:]]*\\[.*\\]$"
- constant: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
- comment:
start: "#"
end: "$"
rules: []

View File

@@ -1,28 +0,0 @@
# This syntax format is used for interactive rebasing
syntax "git-rebase-todo" "git-rebase-todo"
# Default
color ignore ".*"
# Comments
color comment "^#.*"
# Rebase commands
color keyword "^(e|edit) [0-9a-f]{7,40}"
color keyword "^# (e, edit)"
color keyword "^(f|fixup) [0-9a-f]{7,40}"
color keyword "^# (f, fixup)"
color keyword "^(p|pick) [0-9a-f]{7,40}"
color keyword "^# (p, pick)"
color keyword "^(r|reword) [0-9a-f]{7,40}"
color keyword "^# (r, reword)"
color keyword "^(s|squash) [0-9a-f]{7,40}"
color keyword "^# (s, squash)"
color keyword "^(x|exec) [^ ]+ [0-9a-f]{7,40}"
color keyword "^# (x, exec)"
# Recolor hash symbols
color special "#"
# Commit IDs
color identifier "[0-9a-f]{7,40}"

View File

@@ -0,0 +1,30 @@
filetype: git-rebase-todo
detect:
filename: "git-rebase-todo"
rules:
# Default
- ignore: ".*"
# Comments
- comment:
start: "#"
end: "$"
rules: []
# Rebase commands
- keyword: "^(e|edit) [0-9a-f]{7,40}"
- keyword: "^# (e, edit)"
- keyword: "^(f|fixup) [0-9a-f]{7,40}"
- keyword: "^# (f, fixup)"
- keyword: "^(p|pick) [0-9a-f]{7,40}"
- keyword: "^# (p, pick)"
- keyword: "^(r|reword) [0-9a-f]{7,40}"
- keyword: "^# (r, reword)"
- keyword: "^(s|squash) [0-9a-f]{7,40}"
- keyword: "^# (s, squash)"
- keyword: "^(x|exec) [^ ]+ [0-9a-f]{7,40}"
- keyword: "^# (x, exec)"
# Recolor hash symbols
- special: "#"
# Commit IDs
- identifier: "[0-9a-f]{7,40}"

View File

@@ -1,15 +0,0 @@
syntax "glsl" "\.(frag|vert|fp|vp|glsl)$"
color brightblue "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[()]"
color green "\<(void|bool|bvec2|bvec3|bvec4|int|ivec2|ivec3|ivec4|float|vec2|vec3|vec4|mat2|mat3|mat4|struct|sampler1D|sampler2D|sampler3D|samplerCUBE|sampler1DShadow|sampler2DShadow)\>"
color green "\<gl_(DepthRangeParameters|PointParameters|MaterialParameters|LightSourceParameters|LightModelParameters|LightModelProducts|LightProducts|FogParameters)\>"
color cyan "\<(const|attribute|varying|uniform|in|out|inout|if|else|return|discard|while|for|do)\>"
color brightred "\<(break|continue)\>"
color brightcyan "\<(true|false)\>"
color red "[-+/*=<>?:!~%&|^]"
color blue "\<([0-9]+|0x[0-9a-fA-F]*)\>"
color brightblack "(^|[[:space:]])//.*"
color brightblack start="/\*" end="\*/"
color brightwhite,cyan "TODO:?"
color ,green "[[:space:]]+$"
color ,red " + +| + +"

26
runtime/syntax/glsl.yaml Normal file
View File

@@ -0,0 +1,26 @@
filetype: glsl
detect:
filename: "\\.(frag|vert|fp|vp|glsl)$"
rules:
- identifier: "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[()]"
- type: "\\<(void|bool|bvec2|bvec3|bvec4|int|ivec2|ivec3|ivec4|float|vec2|vec3|vec4|mat2|mat3|mat4|struct|sampler1D|sampler2D|sampler3D|samplerCUBE|sampler1DShadow|sampler2DShadow)\\>"
- statement: "\\<gl_(DepthRangeParameters|PointParameters|MaterialParameters|LightSourceParameters|LightModelParameters|LightModelProducts|LightProducts|FogParameters)\\>"
- statement: "\\<(const|attribute|varying|uniform|in|out|inout|if|else|return|discard|while|for|do)\\>"
- statement: "\\<(break|continue)\\>"
- constant: "\\<(true|false)\\>"
- statement: "[-+/*=<>?:!~%&|^]"
- constant.number: "\\<([0-9]+|0x[0-9a-fA-F]*)\\>"
- comment:
start: "//"
end: "$"
rules:
- todo: "TODO:?"
- comment:
start: "/\\*"
end: "\\*/"
rules:
- todo: "TODO:?"

View File

@@ -1,32 +0,0 @@
syntax "go" "\.go$"
# Conditionals and control flow
color statement "\b(break|case|continue|default|else|for|go|goto|if|range|return|switch)\b"
color statement "\b(package|import|const|var|type|struct|func|go|defer|iota)\b"
color statement "[-+/*=<>!~%&|^]|:="
# Types
color special "[a-zA-Z0-9]*\("
color brightyellow "(,|\.)"
color type "\b(u?int(8|16|32|64)?|float(32|64)|complex(64|128))\b"
color type "\b(uintptr|byte|rune|string|interface|bool|map|chan|error)\b"
color constant "\b(true|false|nil)\b"
# Brackets
color statement "(\{|\})"
color statement "(\(|\))"
color statement "(\[|\])"
color statement "!"
color statement ","
# Numbers and strings
color constant.number "\b([0-9]+|0x[0-9a-fA-F]*)\b|'.'"
color constant.string ""(\\.|[^"])*"|'(\\.|[^'])*'"
color constant.specialChar "\\[abfnrtv'\"\\]"
color constant.specialChar "\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})"
color constant.string "`[^`]*`"
# Comments & TODOs
color comment "(^|[[:space:]])//.*"
color comment start="/\*" end="\*/"
color todo "(TODO|XXX|FIXME):?"

52
runtime/syntax/go.yaml Normal file
View File

@@ -0,0 +1,52 @@
filetype: go
detect:
filename: "\\.go$"
rules:
- statement: "\\b(break|case|continue|default|else|for|go|goto|if|range|return|switch)\\b"
- statement: "\\b(package|import|const|var|type|struct|func|go|defer|iota)\\b"
- statement: "[-+/*=<>!~%&|^]|:="
- identifier: "[a-zA-Z0-9]*\\("
- type: "\\b(u?int(8|16|32|64)?|float(32|64)|complex(64|128))\\b"
- type: "\\b(uintptr|byte|rune|string|interface|bool|map|chan|error)\\b"
- constant: "\\b(true|false|nil)\\b"
- statement: "(\\{|\\})"
- statement: "(\\(|\\))"
- statement: "(\\[|\\])"
- statement: "!"
- statement: ","
- constant.number: "\\b([0-9]+|0x[0-9a-fA-F]*)\\b"
- constant.specialChar: "([0-7]{3|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})"
- comment:
start: "//"
end: "$"
rules:
- todo: "(TODO|XXX|FIXME):?"
- comment:
start: "/\\*"
end: "\\*/"
rules:
- todo: "(TODO|XXX|FIXME):?"
- constant.string:
start: "\""
end: "\""
rules:
- constant.specialChar: "\\\\."
- constant.specialChar: "%."
- constant.string:
start: "'"
end: "'"
rules:
- preproc: "..+"
- constant.specialChar: "%."
- constant.specialChar: "\\\\."
- constant.string:
start: "`"
end: "`"
rules: []

View File

@@ -1,48 +0,0 @@
syntax "golo" "\.golo$"
color type "\b(function|fun|)\b"
color type "\b(struct|DynamicObject|union|AdapterFabric|Adapter|DynamicVariable|Observable)\b"
color type "\b(list|set|array|vector|tuple|map)\b"
color type "\b(Ok|Error|Empty|None|Some|Option|Result|Result.ok|Result.fail|Result.error|Result.empty|Optional.empty|Optional.of)\b"
color statement "\b(augment|pimp)\b"
color statement "\b(interfaces|implements|extends|overrides|maker|newInstance)\b"
color statement "\b(isEmpty|isNone|isPresent|isSome|iterator|flattened|toList|flatMap|`and|orElseGet|`or|toResult|apply|either)\b"
color statement "\b(result|option|trying|raising|nullify|catching)\b"
color statement "\b(promise|setFuture|failedFuture|all|any)\b"
color statement "\b(initialize|initializeWithinThread|start|future|fallbackTo|onSet|onFail|cancel|enqueue)\b"
color statement "\b(println|print|raise|readln|readPassword|secureReadPassword|requireNotNull|require|newTypedArray|range|reversedRange|mapEntry|asInterfaceInstance|asFunctionalInterface|isClosure|fileToText|textToFile|fileExists|currentDir|sleep|uuid|isArray|arrayTypeOf|charValue|intValue|longValue|doubleValue|floatValue|removeByIndex|box)\b"
color statement "\b(likelySupported|reset|bold|underscore|blink|reverse_video|concealed|fg_black|fg_red|fg_green|fg_yellow|fg_blue|fg_magenta|fg_cyan|fg_white|bg_black|bg_red|bg_green|bg_yellow|bg_blue|bg_magenta|bg_cyan|bg_white|cursor_position|cursor_save_position|cursor_restore_position|cursor_up|cursor_down|cursor_forward|cursor_backward|erase_display|erase_line)\b"
color statement "\b(emptyList|cons|lazyList|fromIter|generator|repeat|iterate)\b"
color statement "\b(asLazyList|foldl|foldr|take|takeWhile|drop|dropWhile|subList)\b"
color statement "\b(import)\b"
color statement "\b(module)\b"
color statement "\b(JSON)\b"
color statement "\b(stringify|parse|toJSON|toDynamicObject|updateFromJSON)\b"
color statement "\b(newInstance|define|getKey|getValue|properties|fallback)\b"
color statement "\b(times|upTo|downTo)\b"
color statement "\b(format|toInt|toInteger|toDouble|toFloat|toLong)\b"
color statement "\b(head|tail|isEmpty|reduce|each|count|exists)\b"
color statement "\b(newWithSameType|destruct|append|add|addIfAbsent|prepend|insert|last|unmodifiableView|find|filter|map|join|reverse|reversed|order|ordered|removeAt|include|exclude|remove|delete|has|contains|getOrElse|toArray)\b"
color statement "\b(add|addTo|succ|pred|mul|neg|sub|rsub|div|rdiv|mod|rmod|pow|rpow|str|lt|gt|eq|ne|ge|le|`and|`or|`not|xor|even|odd|contains|isEmpty|`is|`isnt|`oftype|`orIfNull|fst|snd|getitem|setitem|getter|id|const|False|True|Null|curry|uncurry|unary|spreader|varargs|swapArgs|swapCurry|swapCouple|swap|invokeWith|pipe|compose|io|andThen|until|recur|cond)\b"
color statement "\b(toUpperCase|equals|startsWith)\b"
color preproc "\b(if|else|then|when|case|match|otherwise)\b"
color preproc "\b(with|break|continue|return)\b"
color error "\b(try|catch|finally|throw)\b"
color identifier "\b(super|this|let|var|local)\b"
color special "[(){}]" "\[" "\]"
color preproc "\b(for|while|foreach|in)\b"
color constant "\b(and|in|is|not|or|isnt|orIfNull)\b"
color constant "\b(true|false)\b"
color constant "\b(null|undefined)\b"
color statement "[-+/*=<>!~%&|^]|:="
color constant.number "\b([0-9]+|0x[0-9a-fA-F]*)\b|'.'"
color constant.string ""(\\.|[^"])*"|'(\\.|[^'])*'"
color comment "#.*$"
color comment start="----" end="----"
color todo "TODO:?"

View File

@@ -1,24 +0,0 @@
## Here is an example for groff.
##
syntax "groff" "\.m[ems]$" "\.rof" "\.tmac$" "^tmac."
## The argument of .ds or .nr
color cyan "^\.(ds|nr) [^[[:space:]]]*"
## Single character escapes
color brightmagenta "\\."
## Highlight the argument of \f or \s in the same color
color brightmagenta "\\f." "\\f\(.." "\\s(\+|\-)?[0-9]"
## Newlines
color cyan "(\\|\\\\)n(.|\(..)"
color cyan start="(\\|\\\\)n\[" end="]"
## Requests
color brightgreen "^\.[[:space:]]*[^[[:space:]]]*"
## Comments
color yellow "^\.\\".*$"
## Strings
color green "(\\|\\\\)\*(.|\(..)"
color green start="(\\|\\\\)\*\[" end="]"
## Characters
color brightred "\\\(.."
color brightred start="\\\[" end="]"
## Macro arguments
color brightcyan "\\\\\$[1-9]"

View File

@@ -1,16 +0,0 @@
syntax "haml" "\.haml$"
color cyan "-|="
color white "->|=>"
cyan (i) "([ ]|^)%[0-9A-Z_]+\>"
magenta (i) ":[0-9A-Z_]+\>"
yellow (i) "\.[A-Z_]+\>"
## Double quote & single quote
color green ""([^"]|(\\"))*"" "%[QW]?\{[^}]*\}" "%[QW]?\([^)]*\)" "%[QW]?<[^>]*>" "%[QW]?\$[^$]*\$" "%[QW]?\^[^^]*\^" "%[QW]?![^!]*!"
color green "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>" "%[qw]\[[^]]*\]" "%[qw]\$[^$]*\$" "%[qw]\^[^^]*\^" "%[qw]![^!]*!"
## Vars
color brightgreen "#\{[^}]*\}"
color brightblue "(@|@@)[0-9A-Z_a-z]+"
## Comments
color brightcyan "#[^{].*$" "#$"

View File

@@ -1,31 +0,0 @@
syntax "haskell" "\.hs$"
## Keywords
color red "[ ](as|case|of|class|data|default|deriving|do|forall|foreign|hiding|if|then|else|import|infix|infixl|infixr|instance|let|in|mdo|module|newtype|qualified|type|where)[ ]"
color red "(^data|^foreign|^import|^infix|^infixl|^infixr|^instance|^module|^newtype|^type)[ ]"
color red "[ ](as$|case$|of$|class$|data$|default$|deriving$|do$|forall$|foreign$|hiding$|if$|then$|else$|import$|infix$|infixl$|infixr$|instance$|let$|in$|mdo$|module$|newtype$|qualified$|type$|where$)"
## Various symbols
color cyan "(\||@|!|:|_|~|=|\\|;|\(\)|,|\[|\]|\{|\})"
## Operators
color magenta "(==|/=|&&|\|\||<|>|<=|>=)"
## Various symbols
color cyan "(->|<-)"
color magenta "\.|\$"
## Data constructors
color magenta "(True|False|Nothing|Just|Left|Right|LT|EQ|GT)"
## Data classes
color magenta "[ ](Read|Show|Enum|Eq|Ord|Data|Bounded|Typeable|Num|Real|Fractional|Integral|RealFrac|Floating|RealFloat|Monad|MonadPlus|Functor)"
## Strings
color yellow ""[^\"]*""
## Comments
color green "--.*"
color green start="\{-" end="-\}"
color brightred "undefined"

View File

@@ -1,7 +0,0 @@
## Here is a short improved example for HTML.
##
syntax "html" "\.htm[l]?$"
color identifier "<.*?>"
color special "&[^;[[:space:]]]*;"
color constant ""[^"]*"|qq\|.*\|"
color statement "(alt|bgcolor|height|href|label|longdesc|name|onclick|onfocus|onload|onmouseover|size|span|src|style|target|type|value|width)="

11
runtime/syntax/html.yaml Normal file
View File

@@ -0,0 +1,11 @@
filetype: html
detect:
filename: "\\.htm[l]?$"
rules:
- identifier: "<.*?>"
- special: "&[^;[[:space:]]]*;"
- statement: "(alt|bgcolor|height|href|label|longdesc|name|onclick|onfocus|onload|onmouseover|size|span|src|style|target|type|value|width)="
- constant: "\"[^\"]*\"|qq\\|.*\\|"

View File

@@ -1,9 +0,0 @@
syntax "ini" "\.(ini|desktop|lfl|override)$" "(mimeapps\.list|pinforc|setup\.cfg)$" "weechat/.+\.conf$"
header "^\[[A-Za-z]+\]$"
color constant "\b(true|false)\b"
color identifier "^[[:space:]]*[^=]*="
color special "^[[:space:]]*\[.*\]$"
color statement "[=;]"
color comment "(^|[[:space:]])#([^{].*)?$"
color constant.string ""(\\.|[^"])*"|'(\\.|[^'])*'"

View File

@@ -1,10 +0,0 @@
syntax "inputrc" "inputrc$"
color red "\<(off|none)\>"
color green "\<on\>"
color brightblue "\<set|\$include\>"
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color magenta "\\.?"
color brightblack "(^|[[:space:]])#([^{].*)?$"
color ,green "[[:space:]]+$"
color ,red " + +| + +"

View File

@@ -1,12 +0,0 @@
## Here is an example for Java.
##
syntax "java" "\.java$"
color type "\b(boolean|byte|char|double|float|int|long|new|short|this|transient|void)\b"
color statement "\b(break|case|catch|continue|default|do|else|finally|for|if|return|switch|throw|try|while)\b"
color type "\b(abstract|class|extends|final|implements|import|instanceof|interface|native|package|private|protected|public|static|strictfp|super|synchronized|throws|volatile)\b"
color constant.string ""[^"]*""
color constant "\b(true|false|null)\b"
color constant.number "\b[0-9]+\b"
color comment "//.*"
color comment start="/\*" end="\*/"
color comment start="/\*\*" end="\*/"

34
runtime/syntax/java.yaml Normal file
View File

@@ -0,0 +1,34 @@
filetype: java
detect:
filename: "\\.java$"
rules:
- type: "\\b(boolean|byte|char|double|float|int|long|new|short|this|transient|void)\\b"
- statement: "\\b(break|case|catch|continue|default|do|else|finally|for|if|return|switch|throw|try|while)\\b"
- type: "\\b(abstract|class|extends|final|implements|import|instanceof|interface|native|package|private|protected|public|static|strictfp|super|synchronized|throws|volatile)\\b"
- constant: "\\b(true|false|null)\\b"
- constant.number: "\\b[0-9]+\\b"
- constant.string:
start: "\""
end: "\""
rules:
- constant.specialChar: "\\\\."
- constant.string:
start: "'"
end: "'"
rules:
- preproc: "..+"
- constant.specialChar: "\\\\."
- comment:
start: "//"
end: "$"
rules: []
- comment:
start: "/\\*"
end: "\\*/"
rules: []

View File

@@ -1,20 +0,0 @@
syntax "javascript" "\.js$"
color constant.number "\b[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\b"
color constant.number "\b[-+]?([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?"
color constant.number "\b[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?"
color identifier "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]"
color statement "\b(break|case|catch|continue|default|delete|do|else|finally)\b"
color statement "\b(for|function|get|if|in|instanceof|new|return|set|switch)\b"
color statement "\b(switch|this|throw|try|typeof|var|void|while|with)\b"
color constant "\b(null|undefined|NaN)\b"
color constant "\b(true|false)\b"
color type "\b(Array|Boolean|Date|Enumerator|Error|Function|Math)\b"
color type "\b(Number|Object|RegExp|String)\b"
color statement "[-+/*=<>!~%?:&|]"
color constant "/[^*]([^/]|(\\/))*[^\\]/[gim]*"
color constant "\\[0-7][0-7]?[0-7]?|\\x[0-9a-fA-F]+|\\[bfnrt'"\?\\]"
color comment "(^|[[:space:]])//.*"
color comment "/\*.+\*/"
color todo "TODO:?"
color constant.string ""(\\.|[^"])*"|'(\\.|[^'])*'"

View File

@@ -0,0 +1,42 @@
filetype: javascript
detect:
filename: "\\.js$"
rules:
- constant.number: "\\b[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\\b"
- constant.number: "\\b[-+]?([0-9]+\\.[0-9]*|[0-9]*\\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?"
- constant.number: "\\b[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?"
- identifier: "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]"
- statement: "\\b(break|case|catch|continue|default|delete|do|else|finally)\\b"
- statement: "\\b(for|function|get|if|in|instanceof|new|return|set|switch)\\b"
- statement: "\\b(switch|this|throw|try|typeof|var|void|while|with)\\b"
- constant: "\\b(null|undefined|NaN)\\b"
- constant: "\\b(true|false)\\b"
- type: "\\b(Array|Boolean|Date|Enumerator|Error|Function|Math)\\b"
- type: "\\b(Number|Object|RegExp|String)\\b"
- statement: "[-+/*=<>!~%?:&|]"
- constant: "/[^*]([^/]|(\\\\/))*[^\\\\]/[gim]*"
- constant: "\\\\[0-7][0-7]?[0-7]?|\\\\x[0-9a-fA-F]+|\\\\[bfnrt'\"\\?\\\\]"
- constant.string:
start: "\""
end: "\""
rules:
- constant.specialChar: "\\\\."
- constant.string:
start: "'"
end: "'"
rules:
- constant.specialChar: "\\\\."
- comment:
start: "//"
end: "$"
rules: []
- comment:
start: "/\\*"
end: "\\*/"
rules: []

View File

@@ -1,13 +0,0 @@
syntax "json" "\.json$"
header "^\{$"
color constant.number "\b[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\b"
color constant.number "\b[-+]?([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?"
color constant.number "\b[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?"
color constant "\b(null)\b"
color constant "\b(true|false)\b"
color constant.string ""(\\.|[^"])*"|'(\\.|[^'])*'"
color statement "\"(\\"|[^"])*\"[[:space:]]*:" "'(\'|[^'])*'[[:space:]]*:"
color constant "\\u[0-9a-fA-F]{4}|\\[bfnrt'"/\\]"
color ,green "[[:space:]]+$"
color ,red " + +| + +"

24
runtime/syntax/json.yaml Normal file
View File

@@ -0,0 +1,24 @@
filetype: json
detect:
filename: "\\.json$"
header: "^\\{$"
rules:
- constant.number: "\\b[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\\b"
- constant.number: "\\b[-+]?([0-9]+\\.[0-9]*|[0-9]*\\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?"
- constant.number: "\\b[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?"
- constant: "\\b(null)\\b"
- constant: "\\b(true|false)\\b"
- constant.string:
start: "\""
end: "\""
rules:
- constant.specialChar: "\\\\."
- constant.string:
start: "'"
end: "'"
rules:
- constant.specialChar: "\\\\."
- statement: "\\\"(\\\\\"|[^\"])*\\\"[[:space:]]*:\" \"'(\\'|[^'])*'[[:space:]]*:"
- constant: "\\\\u[0-9a-fA-F]{4}|\\\\[bfnrt'\"/\\\\]"

View File

@@ -1,10 +0,0 @@
syntax "keymap" "\.(k|key)?map$|Xmodmap$"
color cyan "\<(add|clear|compose|keycode|keymaps|keysym|remove|string)\>"
color cyan "\<(control|alt|shift)\>"
color blue "\<[0-9]+\>"
color red "="
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color brightblack "^!.*$"
color ,green "[[:space:]]+$"
color ,red " + +| + +"

View File

@@ -0,0 +1,24 @@
filetype: keymap
detect:
filename: "\\.(k|key)?map$|Xmodmap$"
rules:
- statement: "\\b(add|clear|compose|keycode|keymaps|keysym|remove|string)\\b"
- statement: "\\b(control|alt|shift)\\b"
- constant.number: "\\b[0-9]+\\b"
- special: "="
- constant.string:
start: "\""
end: "\""
rules:
- constant.specialChar: "\\\\."
- constant.string:
start: "'"
end: "'"
rules:
- constant.specialChar: "\\\\."
- comment:
start: "^!"
end: "$"
rules: []

View File

@@ -1,15 +0,0 @@
syntax "kickstart" "\.ks$" "\.kickstart$"
color brightmagenta "%[a-z]+"
color cyan "^[[:space:]]*(install|cdrom|text|graphical|volgroup|logvol|reboot|timezone|lang|keyboard|authconfig|firstboot|rootpw|user|firewall|selinux|repo|part|partition|clearpart|bootloader)"
color cyan "--(name|mirrorlist|baseurl|utc)(=|\>)"
color brightyellow "\$(releasever|basearch)\>"
# Packages and groups
color brightblack "^@[A-Za-z][A-Za-z-]*"
color brightred "^-@[a-zA-Z0-9*-]+"
color red "^-[a-zA-Z0-9*-]+"
color brightblack "(^|[[:space:]])#([^{].*)?$"
color ,green "[[:space:]]+$"
color ,red " + +| + +"

View File

@@ -1,10 +0,0 @@
syntax "ledger" "(^|\.|/)ledger|ldgr|beancount|bnct$"
color brightmagenta "^([0-9]{4}(/|-)[0-9]{2}(/|-)[0-9]{2}|[=~]) .*"
color blue "^[0-9]{4}(/|-)[0-9]{2}(/|-)[0-9]{2}"
color brightyellow "^~ .*"
color brightblue "^= .*"
color cyan "^[[:space:]]+(![[:space:]]+)?\(?[A-Za-z ]+(:[A-Za-z ]+)*\)?"
color cyan "^[[:space:]]+(![[:space:]]+)?\(?[A-Za-z_-]+(:[A-Za-z_-]+)*\)?"
color red "[*!]"
color brightblack "^[[:space:]]*;.*"

View File

@@ -1,21 +0,0 @@
syntax "lfe" "lfe$" "\.lfe$"
# Parens are everywhere!
color statement "\("
color statement "\)"
# Good overrides for LFE in particular
color type "defun|define-syntax|define|defmacro|defmodule|export"
# Dirty base cases stolen from the generic lisp syntax
color constant "\ [A-Za-z][A-Za-z0-9_-]+\ "
color statement "\(([-+*/<>]|<=|>=)|'"
color constant.number "\<[0-9]+\>"
color constant.string "\"(\\.|[^"])*\""
color special "['|`][A-Za-z][A-Za-z0-9_-]+"
color constant.string "\\.?"
color comment "(^|[[:space:]]);.*"
# Some warning colors because our indents are wrong.
color ,green "[[:space:]]+$"
color ,red " + +| + +"

View File

@@ -1,10 +0,0 @@
syntax "lilypond" "\.ly$" "\.ily$" "\.lly$"
color constant.number "\d+"
color identifier "[[:space:]](staff|spacing|signature|routine|notes|handler|corrected|beams|arpeggios|Volta_engraver|Voice|Vertical_align_engraver|Vaticana_ligature_engraver|VaticanaVoice|VaticanaStaff|Tweak_engraver|Tuplet_engraver|Trill_spanner_engraver|Timing_translator|Time_signature_performer|Time_signature_engraver|Tie_performer|Tie_engraver|Text_spanner_engraver|Text_engraver|Tempo_performer|Tab_tie_follow_engraver|Tab_staff_symbol_engraver|Tab_note_heads_engraver|TabVoice|TabStaff|System_start_delimiter_engraver|Stem_engraver|Stanza_number_engraver|Stanza_number_align_engraver|Staff_symbol_engraver|Staff_performer|Staff_collecting_engraver|StaffGroup|Staff|Spanner_break_forbid_engraver|Span_bar_stub_engraver|Span_bar_engraver|Span_arpeggio_engraver|Spacing_engraver|Slur_performer|Slur_engraver|Slash_repeat_engraver|Separating_line_group_engraver|Script_row_engraver|Script_engraver|Script_column_engraver|Score|Rhythmic_column_engraver|RhythmicStaff|Rest_engraver|Rest_collision_engraver|Repeat_tie_engraver|Repeat_acknowledge_engraver|Pure_from_neighbor_engraver|Pitched_trill_engraver|Pitch_squash_engraver|Piano_pedal_performer|Piano_pedal_engraver|Piano_pedal_align_engraver|PianoStaff|Phrasing_slur_engraver|PetrucciVoice|PetrucciStaff|Percent_repeat_engraver|Part_combine_engraver|Parenthesis_engraver|Paper_column_engraver|Output_property_engraver|Ottava_spanner_engraver|OneStaff|NullVoice|Note_spacing_engraver|Note_performer|Note_name_engraver|Note_heads_engraver|Note_head_line_engraver|NoteName\|NoteHead|New_fingering_engraver|Multi_measure_rest_engraver|Midi_control_function_performer|Metronome_mark_engraver|Mensural_ligature_engraver|MensuralVoice|MensuralStaff|Mark_engraver|Lyrics|Lyric_performer|Lyric_engraver|Ligature_bracket_engraver|Ledger_line_engraver|Laissez_vibrer_engraver|Kievan_ligature_engraver|KievanVoice|KievanStaff|Key_performer|Key_engraver|Keep_alive_together_engraver|Instrument_switch_engraver|Instrument_name_engraver|Hyphen_engraver|Grob_pq_engraver|GregorianTranscriptionVoice|GregorianTranscriptionStaff|GrandStaff|Grace_spacing_engraver|Grace_engraver|Grace_beam_engraver|Grace_auto_beam_engraver|Global|Glissando_engraver|Fretboard_engraver|FretBoards|Forbid_line_break_engraver|Footnote_engraver|Font_size_engraver|Fingering_engraver|Fingering_column_engraver|Figured_bass_position_engraver|Figured_bass_engraver|FiguredBass|Extender_engraver|Episema_engraver|Dynamics|Dynamic_performer|Dynamic_engraver|Dynamic_align_engraver|Drum_notes_engraver|Drum_note_performer|DrumVoice|DrumStaff|Double_percent_repeat_engraver|Dots_engraver|Dot_column_engraver|Devnull|Default_bar_line_engraver|Custos_engraver|Cue_clef_engraver|CueVoice|Control_track_performer|Concurrent_hairpin_engraver|Collision_engraver|Cluster_spanner_engraver|Clef_engraver|Chord_tremolo_engraver|Chord_name_engraver|ChordNames|ChoirStaff|Breathing_sign_engraver|Break_align_engraver|Bend_engraver|Beam_performer|Beam_engraver|Beam_collision_engraver|Bar_number_engraver|Bar_engraver|Axis_group_engraver|Auto_beam_engraver|Arpeggio_engraver|Accidental_engraver|Score)[[:space:]]"
color statement "[-_^]?\\[-A-Za-z_]+"
color preproc "\b(((gisis|gis|geses|ges|g|fisis|fis|feses|fes|f|eisis|eis|eeses|ees|e|disis|dis|deses|des|d|cisis|cis|ceses|ces|c|bisis|bis|beses|bes|b|aisis|ais|aeses|aes|a)[,']*[?!]?)|s|r|R|q)(128|64|32|16|8|4|2|1|\\breve|\\longa|\\maxima)?([^\\\w]|_|\b)"
color special "[(){}<>]" "\[" "\]"
color constant.string "\".*\""
color comment start="%{" end="%}"
color comment "%.*$"

View File

@@ -0,0 +1,24 @@
filetype: lilypond
detect:
filename: "\\.ly$|\\.ily$|\\.lly$"
rules:
- constant.number: "\\d+"
- identifier: "\\b(staff|spacing|signature|routine|notes|handler|corrected|beams|arpeggios|Volta_engraver|Voice|Vertical_align_engraver|Vaticana_ligature_engraver|VaticanaVoice|VaticanaStaff|Tweak_engraver|Tuplet_engraver|Trill_spanner_engraver|Timing_translator|Time_signature_performer|Time_signature_engraver|Tie_performer|Tie_engraver|Text_spanner_engraver|Text_engraver|Tempo_performer|Tab_tie_follow_engraver|Tab_staff_symbol_engraver|Tab_note_heads_engraver|TabVoice|TabStaff|System_start_delimiter_engraver|Stem_engraver|Stanza_number_engraver|Stanza_number_align_engraver|Staff_symbol_engraver|Staff_performer|Staff_collecting_engraver|StaffGroup|Staff|Spanner_break_forbid_engraver|Span_bar_stub_engraver|Span_bar_engraver|Span_arpeggio_engraver|Spacing_engraver|Slur_performer|Slur_engraver|Slash_repeat_engraver|Separating_line_group_engraver|Script_row_engraver|Script_engraver|Script_column_engraver|Score|Rhythmic_column_engraver|RhythmicStaff|Rest_engraver|Rest_collision_engraver|Repeat_tie_engraver|Repeat_acknowledge_engraver|Pure_from_neighbor_engraver|Pitched_trill_engraver|Pitch_squash_engraver|Piano_pedal_performer|Piano_pedal_engraver|Piano_pedal_align_engraver|PianoStaff|Phrasing_slur_engraver|PetrucciVoice|PetrucciStaff|Percent_repeat_engraver|Part_combine_engraver|Parenthesis_engraver|Paper_column_engraver|Output_property_engraver|Ottava_spanner_engraver|OneStaff|NullVoice|Note_spacing_engraver|Note_performer|Note_name_engraver|Note_heads_engraver|Note_head_line_engraver|NoteName\\|NoteHead|New_fingering_engraver|Multi_measure_rest_engraver|Midi_control_function_performer|Metronome_mark_engraver|Mensural_ligature_engraver|MensuralVoice|MensuralStaff|Mark_engraver|Lyrics|Lyric_performer|Lyric_engraver|Ligature_bracket_engraver|Ledger_line_engraver|Laissez_vibrer_engraver|Kievan_ligature_engraver|KievanVoice|KievanStaff|Key_performer|Key_engraver|Keep_alive_together_engraver|Instrument_switch_engraver|Instrument_name_engraver|Hyphen_engraver|Grob_pq_engraver|GregorianTranscriptionVoice|GregorianTranscriptionStaff|GrandStaff|Grace_spacing_engraver|Grace_engraver|Grace_beam_engraver|Grace_auto_beam_engraver|Global|Glissando_engraver|Fretboard_engraver|FretBoards|Forbid_line_break_engraver|Footnote_engraver|Font_size_engraver|Fingering_engraver|Fingering_column_engraver|Figured_bass_position_engraver|Figured_bass_engraver|FiguredBass|Extender_engraver|Episema_engraver|Dynamics|Dynamic_performer|Dynamic_engraver|Dynamic_align_engraver|Drum_notes_engraver|Drum_note_performer|DrumVoice|DrumStaff|Double_percent_repeat_engraver|Dots_engraver|Dot_column_engraver|Devnull|Default_bar_line_engraver|Custos_engraver|Cue_clef_engraver|CueVoice|Control_track_performer|Concurrent_hairpin_engraver|Collision_engraver|Cluster_spanner_engraver|Clef_engraver|Chord_tremolo_engraver|Chord_name_engraver|ChordNames|ChoirStaff|Breathing_sign_engraver|Break_align_engraver|Bend_engraver|Beam_performer|Beam_engraver|Beam_collision_engraver|Bar_number_engraver|Bar_engraver|Axis_group_engraver|Auto_beam_engraver|Arpeggio_engraver|Accidental_engraver|Score)\\b"
- statement: "[-_^]?\\\\[-A-Za-z_]+"
- preproc: "\\b(((gisis|gis|geses|ges|g|fisis|fis|feses|fes|f|eisis|eis|eeses|ees|e|disis|dis|deses|des|d|cisis|cis|ceses|ces|c|bisis|bis|beses|bes|b|aisis|ais|aeses|aes|a)[,']*[?!]?)|s|r|R|q)(128|64|32|16|8|4|2|1|\\\\breve|\\\\longa|\\\\maxima)?([^\\\\\\w]|_|\\b)"
- special: "[(){}<>]|\\[|\\]"
- constant.string:
start: "\""
end: "\""
rules:
- constant.specialChar: "\\\\."
- comment:
start: "%\\{"
end: "%\\}"
rules: []
- comment:
start: "%"
end: "$"
rules: []

View File

@@ -1,13 +0,0 @@
syntax "lisp" "(emacs|zile)$" "\.(el|li?sp|scm|ss)$"
color brightblue "\([a-z-]+"
color red "\(([-+*/<>]|<=|>=)|'"
color blue "\<[0-9]+\>"
cyan (i) "\<nil\>"
color brightcyan "\<[tT]\>"
color yellow "\"(\\.|[^"])*\""
color magenta "'[A-Za-z][A-Za-z0-9_-]+"
color magenta "\\.?"
color brightblack "(^|[[:space:]]);.*"
color ,green "[[:space:]]+$"
color ,red " + +| + +"

View File

@@ -1,71 +0,0 @@
##############################################################################
#
# Lua syntax highlighting for Micro.
#
# Author: Matthew Wild <mwild1 (at) gmail.com>
# License: GPL 2 or later
#
# Version: 2007-06-06
#
# Notes: Originally based on Ruby syntax rc by Josef 'Jupp' Schugt
##############################################################################
# Automatically use for '.lua' files
syntax "lua" ".*\.lua$"
# Statements
color statement "\b(do|end|while|repeat|until|if|elseif|then|else|for|in|function|local|return)\b"
# Logic
color statement "\b(not|and|or)\b"
# Keywords
color statement "\b(debug|string|math|table|io|coroutine|os|utf8|bit32)\b\."
color statement "\b(_ENV|_G|_VERSION|assert|collectgarbage|dofile|error|getfenv|getmetatable|ipairs|load|loadfile|module|next|pairs|pcall|print|rawequal|rawget|rawlen|rawset|require|select|setfenv|setmetatable|tonumber|tostring|type|unpack|xpcall)\s*\("
# Standard library
color identifier "io\.\b(close|flush|input|lines|open|output|popen|read|tmpfile|type|write)\b"
color identifier "math\.\b(abs|acos|asin|atan2|atan|ceil|cosh|cos|deg|exp|floor|fmod|frexp|huge|ldexp|log10|log|max|maxinteger|min|mininteger|modf|pi|pow|rad|random|randomseed|sinh|sqrt|tan|tointeger|type|ult)\b"
color identifier "os\.\b(clock|date|difftime|execute|exit|getenv|remove|rename|setlocale|time|tmpname)\b"
color identifier "package\.\b(config|cpath|loaded|loadlib|path|preload|seeall|searchers|searchpath)\b"
color identifier "string\.\b(byte|char|dump|find|format|gmatch|gsub|len|lower|match|pack|packsize|rep|reverse|sub|unpack|upper)\b"
color identifier "table\.\b(concat|insert|maxn|move|pack|remove|sort|unpack)\b"
color identifier "utf8\.\b(char|charpattern|codes|codepoint|len|offset)\b"
color identifier "coroutine\.\b(create|isyieldable|resume|running|status|wrap|yield)\b"
color identifier "debug\.\b(debug|getfenv|gethook|getinfo|getlocal|getmetatable|getregistry|getupvalue|getuservalue|setfenv|sethook|setlocal|setmetatable|setupvalue|setuservalue|traceback|upvalueid|upvaluejoin)\b"
color identifier "bit32\.\b(arshift|band|bnot|bor|btest|bxor|extract|replace|lrotate|lshift|rrotate|rshift)\b"
# File handle methods
color identifier "\:\b(close|flush|lines|read|seek|setvbuf|write)\b"
# false, nil, true
color constant "\b(false|nil|true)\b"
# External files
color statement "(\b(dofile|require|include)|%q|%!|%Q|%r|%x)\b"
# Numbers
color constant.number "\b([0-9]+)\b"
# Symbols
color symbol "(\(|\)|\[|\]|\{|\}|\*\*|\*|/|%|\+|-|\^|>|>=|<|<=|~=|=|\.\.)"
# Strings
color constant.string "\"(\\.|[^\\\"])*\"|'(\\.|[^\\'])*'"
# Multiline strings
color constant start="\s*\[\[" end="\]\]"
# Escapes
color special "\\[0-7][0-7][0-7]|\\x[0-9a-fA-F][0-9a-fA-F]|\\[abefnrs]|(\\c|\\C-|\\M-|\\M-\\C-)."
# Shebang
color comment "^#!.*"
# Simple brightblacks
color comment "\-\-.*$"
# Multiline brightblacks
color comment start="\s*\-\-\s*\[\[" end="\]\]"

60
runtime/syntax/lua.yaml Normal file
View File

@@ -0,0 +1,60 @@
filetype: lua
detect:
filename: "\\.lua$"
rules:
- statement: "\\b(do|end|while|repeat|until|if|elseif|then|else|for|in|function|local|return)\\b"
- statement: "\\b(not|and|or)\\b"
- statement: "\\b(debug|string|math|table|io|coroutine|os|utf8|bit32)\\b\\."
- statement: "\\b(_ENV|_G|_VERSION|assert|collectgarbage|dofile|error|getfenv|getmetatable|ipairs|load|loadfile|module|next|pairs|pcall|print|rawequal|rawget|rawlen|rawset|require|select|setfenv|setmetatable|tonumber|tostring|type|unpack|xpcall)\\s*\\("
- identifier: "io\\.\\b(close|flush|input|lines|open|output|popen|read|tmpfile|type|write)\\b"
- identifier: "math\\.\\b(abs|acos|asin|atan2|atan|ceil|cosh|cos|deg|exp|floor|fmod|frexp|huge|ldexp|log10|log|max|maxinteger|min|mininteger|modf|pi|pow|rad|random|randomseed|sinh|sqrt|tan|tointeger|type|ult)\\b"
- identifier: "os\\.\\b(clock|date|difftime|execute|exit|getenv|remove|rename|setlocale|time|tmpname)\\b"
- identifier: "package\\.\\b(config|cpath|loaded|loadlib|path|preload|seeall|searchers|searchpath)\\b"
- identifier: "string\\.\\b(byte|char|dump|find|format|gmatch|gsub|len|lower|match|pack|packsize|rep|reverse|sub|unpack|upper)\\b"
- identifier: "table\\.\\b(concat|insert|maxn|move|pack|remove|sort|unpack)\\b"
- identifier: "utf8\\.\\b(char|charpattern|codes|codepoint|len|offset)\\b"
- identifier: "coroutine\\.\\b(create|isyieldable|resume|running|status|wrap|yield)\\b"
- identifier: "debug\\.\\b(debug|getfenv|gethook|getinfo|getlocal|getmetatable|getregistry|getupvalue|getuservalue|setfenv|sethook|setlocal|setmetatable|setupvalue|setuservalue|traceback|upvalueid|upvaluejoin)\\b"
- identifier: "bit32\\.\\b(arshift|band|bnot|bor|btest|bxor|extract|replace|lrotate|lshift|rrotate|rshift)\\b"
- identifier: "\\:\\b(close|flush|lines|read|seek|setvbuf|write)\\b"
- constant: "\\b(false|nil|true)\\b"
- statement: "(\\b(dofile|require|include)|%q|%!|%Q|%r|%x)\\b"
- constant.number: "\\b([0-9]+)\\b"
- symbol: "(\\(|\\)|\\[|\\]|\\{|\\}|\\*\\*|\\*|/|%|\\+|-|\\^|>|>=|<|<=|~=|=|\\.\\.)"
- constant.string:
start: "\""
end: "\""
rules:
- constant.specialChar: "\\\\."
- constant.string:
start: "'"
end: "'"
rules:
- constant.specialChar: "\\\\."
- constant.string:
start: "\\[\\["
end: "\\]\\]"
rules:
- constant.specialChar: "\\\\."
- special: "\\\\[0-7][0-7][0-7]|\\\\x[0-9a-fA-F][0-9a-fA-F]|\\\\[abefnrs]|(\\\\c|\\\\C-|\\\\M-|\\\\M-\\\\C-)."
- comment:
start: "#"
end: "$"
rules: []
- comment:
start: "\\-\\-"
end: "$"
rules: []
- comment:
start: "\\-\\-\\[\\["
end: "\\]\\]"
rules: []

View File

@@ -1,13 +0,0 @@
syntax "mail" "(.*/mutt-.*|\.eml)$"
header "^From .* \d+:\d+:\d+ \d+"
color yellow "^From .*"
color identifier "^[^[:space:]]+:"
color preproc "^List-(Id|Archive|Subscribe|Unsubscribe|Post|Help):"
color constant "^(To|From):"
color constant.string "^Subject:.*"
color statement "<?[^@[:space:]]+@[^[:space:]]+>?"
color default start="^\n\n" end=".*"
color comment "^>.*$"

25
runtime/syntax/mail.yaml Normal file
View File

@@ -0,0 +1,25 @@
filetype: mail
detect:
filename: "(.*/mutt-.*|\\.eml)$"
header: "^From .* \\d+:\\d+:\\d+ \\d+"
rules:
- type: "^From .*"
- identifier: "^[^[:space:]]+:"
- preproc: "^List-(Id|Archive|Subscribe|Unsubscribe|Post|Help):"
- constant: "^(To|From):"
- constant.string:
start: "^Subject:.*"
end: "$"
rules:
- constant.specialChar: "\\\\."
- statement: "<?[^@[:space:]]+@[^[:space:]]+>?"
- default:
start: "^\\n\\n"
end: ".*"
rules: []
- comment:
start: "^>.*"
end: "$"
rules: []

View File

@@ -1,20 +0,0 @@
syntax "makefile" "([Mm]akefile|\.ma?k)$"
header "^#!.*/(env +)?[bg]?make( |$)"
color preproc "\<(ifeq|ifdef|ifneq|ifndef|else|endif)\>"
color statement "^(export|include|override)\>"
color operator "^[^:= ]+:"
color operator "[=,%]" "\+=|\?=|:=|&&|\|\|"
color statement "\$\((abspath|addprefix|addsuffix|and|basename|call|dir)[[:space:]]"
color statement "\$\((error|eval|filter|filter-out|findstring|firstword)[[:space:]]"
color statement "\$\((flavor|foreach|if|info|join|lastword|notdir|or)[[:space:]]"
color statement "\$\((origin|patsubst|realpath|shell|sort|strip|suffix)[[:space:]]"
color statement "\$\((value|warning|wildcard|word|wordlist|words)[[:space:]]"
color identifier "^.+:"
color identifier "[()$]"
color constant ""(\\.|[^"])*"|'(\\.|[^'])*'"
color identifier "\$+(\{[^} ]+\}|\([^) ]+\))"
color identifier "\$[@^<*?%|+]|\$\([@^<*?%+-][DF]\)"
color identifier "\$\$|\\.?"
color comment "(^|[[:space:]])#([^{].*)?$"
color comment "^ @#.*"

View File

@@ -0,0 +1,35 @@
filetype: makefile
detect:
filename: "([Mm]akefile|\\.ma?k)$"
header: "^#!.*/(env +)?[bg]?make( |$)"
rules:
- preproc: "\\<(ifeq|ifdef|ifneq|ifndef|else|endif)\\>"
- statement: "^(export|include|override)\\>"
- operator: "^[^:= ]+:"
- operator: "([=,%]|\\+=|\\?=|:=|&&|\\|\\|)"
- statement: "\\$\\((abspath|addprefix|addsuffix|and|basename|call|dir)[[:space:]]"
- statement: "\\$\\((error|eval|filter|filter-out|findstring|firstword)[[:space:]]"
- statement: "\\$\\((flavor|foreach|if|info|join|lastword|notdir|or)[[:space:]]"
- statement: "\\$\\((origin|patsubst|realpath|shell|sort|strip|suffix)[[:space:]]"
- statement: "\\$\\((value|warning|wildcard|word|wordlist|words)[[:space:]]"
- identifier: "^.+:"
- identifier: "[()$]"
- constant.string:
start: "\""
end: "\""
rules:
- constant.specialChar: "\\\\."
- constant.string:
start: "'"
end: "'"
rules:
- constant.specialChar: "\\\\."
- identifier: "\\$+(\\{[^} ]+\\}|\\([^) ]+\\))"
- identifier: "\\$[@^<*?%|+]|\\$\\([@^<*?%+-][DF]\\)"
- identifier: "\\$\\$|\\\\.?"
- comment:
start: "#"
end: "$"
rules: []

View File

@@ -1,9 +0,0 @@
## Here is an example for manpages.
##
syntax "man" "\.[1-9]x?$"
color green "\.(S|T)H.*$"
color brightgreen "\.(S|T)H" "\.TP"
color brightred "\.(BR?|I[PR]?).*$"
color brightblue "\.(BR?|I[PR]?|PP)"
color brightwhite "\\f[BIPR]"
color yellow "\.(br|DS|RS|RE|PD)"

View File

@@ -1,44 +0,0 @@
syntax "markdown" "\.(md|mkd|mkdn|markdown)$"
# Tables (Github extension)
color type ".*[ :]\|[ :].*"
# quotes
color statement "^>.*"
# Emphasis
color type "(^|[[:space:]])(_[^ ][^_]*_|\*[^ ][^*]*\*)"
# Strong emphasis
color type "(^|[[:space:]])(__[^ ][^_]*__|\*\*[^ ][^*]*\*\*)"
# strike-through
color type "(^|[[:space:]])~~[^ ][^~]*~~"
# horizontal rules
color special "^(---+|===+|___+|\*\*\*+)\s*$"
# headlines
color special "^#{1,6}.*"
# lists
color identifier "^[[:space:]]*[\*+-] |^[[:space:]]*[0-9]+\. "
# misc
color preproc "\(([CcRr]|[Tt][Mm])\)" "\.{3}" "(^|[[:space:]])\-\-($|[[:space:]])"
# links
color constant "\[[^]]+\]"
color constant "\[([^][]|\[[^]]*\])*\]\([^)]+\)"
# images
color underlined "!\[[^][]*\](\([^)]+\)|\[[^]]+\])"
# urls
color underlined "https?://[^ )>]+"
# code
color special "`.*?`|^ {4}[^-+*].*"
# code blocks
color special "^```$"

View File

@@ -0,0 +1,49 @@
filetype: markdown
detect:
filename: "\\.(md|mkd|mkdn|markdown)$"
rules:
# Tables (Github extension)
- type: ".*[ :]\\|[ :].*"
# quotes
- statement: "^>.*"
# Emphasis
- type: "(^|[[:space:]])(_[^ ][^_]*_|\\*[^ ][^*]*\\*)"
# Strong emphasis
- type: "(^|[[:space:]])(__[^ ][^_]*__|\\*\\*[^ ][^*]*\\*\\*)"
# strike-through
- type: "(^|[[:space:]])~~[^ ][^~]*~~"
# horizontal rules
- special: "^(---+|===+|___+|\\*\\*\\*+)\\s*$"
# headlines
- special: "^#{1,6}.*"
# lists
- identifier: "^[[:space:]]*[\\*+-] |^[[:space:]]*[0-9]+\\. "
# misc
- preproc: "(\\(([CcRr]|[Tt][Mm])\\)|\\.{3}|(^|[[:space:]])\\-\\-($|[[:space:]]))"
# links
- constant: "\\[[^]]+\\]"
- constant: "\\[([^][]|\\[[^]]*\\])*\\]\\([^)]+\\)"
# images
- underlined: "!\\[[^][]*\\](\\([^)]+\\)|\\[[^]]+\\])"
# urls
- underlined: "https?://[^ )>]+"
- special: "^```$"
- special:
start: "`"
end: "`"
rules: []

View File

@@ -1,13 +0,0 @@
# Micro syntax by <nickolay02@inbox.ru>
syntax "micro" "\.(micro)$"
color statement "\b(syntax|color(-link)?)\b"
color statement "\b(start=|end=)\b"
color identifier "\b(default|comment|symbol|identifier|constant(.string(.char)?|.number)?|statement|preproc|type|special|underlined|error|todo|statusline|indent-char|(current-)?line-number|gutter-error|gutter-warning|cursor-line|color-column)\b"
color constant.number "\b(|h|A|0x)+[0-9]+(|h|A)+\b"
color constant.number "\b0x[0-9 a-f A-F]+\b"
color comment "#.*$"
color constant.string ""(\\.|[^"])*""
color constant.number "#[0-9 A-F a-f]+"

22
runtime/syntax/micro.yaml Normal file
View File

@@ -0,0 +1,22 @@
filetype: micro
detect:
filename: "\\.(micro)$"
rules:
- statement: "\\b(syntax|color(-link)?)\\b"
- statement: "\\b(start=|end=)\\b"
- identifier: "\\b(default|comment|symbol|identifier|constant(.string(.char)?|.number)?|statement|preproc|type|special|underlined|error|todo|statusline|indent-char|(current-)?line-number|gutter-error|gutter-warning|cursor-line|color-column)\\b"
- constant.number: "\\b(|h|A|0x)+[0-9]+(|h|A)+\\b"
- constant.number: "\\b0x[0-9 a-f A-F]+\\b"
- comment:
start: "#"
end: "$"
rules: []
- constant.string:
start: "\""
end: "\""
rules:
- constant.specialChar: "\\\\."
- constant.number: "#[0-9 A-F a-f]+"

View File

@@ -1,9 +0,0 @@
syntax "mpd" "mpd\.conf$"
color cyan "\<(user|group|bind_to_address|host|port|plugin|name|type)\>"
color cyan "\<((music|playlist)_directory|(db|log|state|pid|sticker)_file)\>"
color brightmagenta "^(input|audio_output|decoder)[[:space:]]*\{|\}"
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color brightblack "(^|[[:space:]])#([^{].*)?$"
color ,green "[[:space:]]+$"
color ,red " + +| + +"

View File

@@ -1,17 +0,0 @@
## Here is an example for nanorc files.
##
syntax "nanorc" "\.?nanorc$"
## Possible errors and parameters
brightwhite (i) "^[[:space:]]*((un)?set|include|syntax|i?color).*$"
## Keywords
brightgreen (i) "^[[:space:]]*(set|unset)[[:space:]]+(autoindent|backup|backupdir|backwards|boldtext|brackets|casesensitive|const|cut|fill|historylog|matchbrackets|morespace|mouse|multibuffer|noconvert|nofollow|nohelp|nonewlines|nowrap|operatingdir|preserve|punct)\>" "^[[:space:]]*(set|unset)[[:space:]]+(quickblank|quotestr|rebinddelete|rebindkeypad|regexp|smarthome|smooth|speller|suspend|tabsize|tabstospaces|tempfile|undo|view|whitespace|wordbounds)\>"
green (i) "^[[:space:]]*(set|unset|include|syntax|header)\>"
## Colors
yellow (i) "^[[:space:]]*i?color[[:space:]]*(bright)?(white|black|red|blue|green|yellow|magenta|cyan)?(,(white|black|red|blue|green|yellow|magenta|cyan))?\>"
magenta (i) "^[[:space:]]*i?color\>" "\<(start|end)="
## Strings
white (i) ""(\\.|[^"])*""
## Comments
brightblue (i) "^[[:space:]]*#.*$"
cyan (i) "^[[:space:]]*##.*$"

View File

@@ -1,13 +0,0 @@
syntax "nginx" "nginx.*\.conf$" "\.nginx$"
header "^(server|upstream)[a-z ]*\{$"
color brightmagenta "\<(events|server|http|location|upstream)[[:space:]]*\{"
color cyan "(^|[[: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:]]|$)"
color brightcyan "\<(on|off)\>"
color brightyellow "\$[A-Za-z][A-Za-z0-9_]*"
color red "[*]"
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color yellow start="'$" end="';$"
color brightblack "(^|[[:space:]])#([^{].*)?$"
color ,green "[[:space:]]+$"
color ,red " + +| + +"

View File

@@ -1,28 +0,0 @@
syntax "nim" "\.nim$"
color 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[\}\|]"
color 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"
color 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"
color statement "[=\+\-\*/<>@\$~&%\|!\?\^\.:\\]+"
color special "\{\." "\.\}" "\[\." "\.\]" "\(\." "\.\)" ";" "," "`"
color statement "\.\."
color type "\b(int|cint|int8|int16|int32|int64|uint|uint8|uint16|uint32|uint64|float|float32|float64|bool|char|enum|string|cstring|array|openarray|seq|varargs|tuple|object|set|void|auto|cshort|range|nil|T|untyped|typedesc)\b"
color type "'[iI](8|16|32|64)?\b" "'[uU](8|16|32|64)?\b" "'[fF](32|64|128)?\b" "'[dD]\b"
color constant.number "\b[0-9]+\b"
color constant.number "\b0[xX][0-9A-Fa-f][0-9_A-Fa-f]+\b"
color constant.number "\b0[ocC][0-7][0-7_]+\b"
color constant.number "\b0[bB][01][01_]+\b"
color constant.number "\b[0-9_]((\.?)[0-9_]+)?[eE][+\-][0-9][0-9_]+\b"
color constant.string ""(\\.|[^"])*"|'(\\.|[^'])*'"
color comment "[[:space:]]*#.*$"
color comment start="\#\[" end="\]\#"
color todo "(TODO|FIXME|XXX):?"

View File

@@ -1,37 +0,0 @@
## Here is an example for Obj-C.
##
syntax "Objective-C" "\.(m|mm|h)$"
color 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"
color type "\b((s?size)|((u_?)?int(8|16|32|64|ptr)))_t\b"
color type "\b[A-Z][A-Z][[:alnum:]]*\b"
color type "\b[A-Za-z0-9_]*_t\b"
color type "\bdispatch_[a-zA-Z0-9_]*_t\b"
color statement "__attribute__[[:space:]]*\(\([^)]*\)\)" "__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__" "__unused" "_Nonnull" "_Nullable" "__block" "__builtin.*"
color statement "\b(class|namespace|template|public|protected|private|typename|this|friend|virtual|using|mutable|volatile|register|explicit)\b"
color statement "\b(for|if|while|do|else|case|default|switch)\b"
color statement "\b(try|throw|catch|operator|new|delete)\b"
color statement "\b(goto|continue|break|return)\b"
color statement "\b(nonatomic|atomic|readonly|readwrite|strong|weak|assign)\b"
color statement "@(encode|end|interface|implementation|class|selector|protocol|synchronized|try|catch|finally|property|optional|required|import|autoreleasepool)"
color preproc "^[[:space:]]*#[[:space:]]*(define|include|import|(un|ifn?)def|endif|el(if|se)|if|warning|error|pragma).*$"
color preproc "__[A-Z0-9_]*__"
color special "^[[:space:]]*[#|@][[:space:]]*(import|include)[[:space:]]*[\"|<].*\/?[>|\"][[:space:]]*$"
color statement "[.:;,+*|=!\%\[\]]" "<" ">" "/" "-" "&"
color constant.number "\b(-?)?[0-9]+\b" "\b\[0-9]+\.[0-9]+\b" "\b0x[0-9A-F]+\b"
color constant "@\[(\\.|[^\]])*\]" "@\{(\\.|[^\}])*\}" "@\((\\.|[^\)])*\)"
color constant "\b<(\\.[^\>])*\>\b"
color constant "\b(nil|NULL|YES|NO|TRUE|true|FALSE|false|self)\b"
color constant "\bk[[:alnum]]*\b"
color constant.string "\"(\\.|[^\"])*\"" "@\"(\\.|[^\"])*\"" "'.'"
color comment "//.*"
color comment start="/\*" end="\*/"

57
runtime/syntax/objc.yaml Normal file
View File

@@ -0,0 +1,57 @@
filetype: objective-c
detect:
filename: "\\.(m|mm|h)$"
rules:
- 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"
- type: "\\b((s?size)|((u_?)?int(8|16|32|64|ptr)))_t\\b"
- type: "\\b[A-Z][A-Z][[:alnum:]]*\\b"
- type: "\\b[A-Za-z0-9_]*_t\\b"
- type: "\\bdispatch_[a-zA-Z0-9_]*_t\\b"
- statement: "(__attribute__[[:space:]]*\\(\\([^)]*\\)\\)|__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__|__unused|_Nonnull|_Nullable|__block|__builtin.*)"
- statement: "\\b(class|namespace|template|public|protected|private|typename|this|friend|virtual|using|mutable|volatile|register|explicit)\\b"
- statement: "\\b(for|if|while|do|else|case|default|switch)\\b"
- statement: "\\b(try|throw|catch|operator|new|delete)\\b"
- statement: "\\b(goto|continue|break|return)\\b"
- statement: "\\b(nonatomic|atomic|readonly|readwrite|strong|weak|assign)\\b"
- statement: "@(encode|end|interface|implementation|class|selector|protocol|synchronized|try|catch|finally|property|optional|required|import|autoreleasepool)"
- preproc: "^[[:space:]]*#[[:space:]]*(define|include|import|(un|ifn?)def|endif|el(if|se)|if|warning|error|pragma).*$"
- preproc: "__[A-Z0-9_]*__"
- special: "^[[:space:]]*[#|@][[:space:]]*(import|include)[[:space:]]*[\"|<].*\\/?[>|\"][[:space:]]*$"
- statement: "([.:;,+*|=!\\%\\[\\]]|<|>|/|-|&)"
- constant.number: "(\\b(-?)?[0-9]+\\b|\\b\\[0-9]+\\.[0-9]+\\b|\\b0x[0-9A-F]+\\b)"
- constant: "(@\\[(\\\\.|[^\\]])*\\]|@\\{(\\\\.|[^\\}])*\\}|@\\((\\\\.|[^\\)])*\\))"
- constant: "\\b<(\\\\.[^\\>])*\\>\\b"
- constant: "\\b(nil|NULL|YES|NO|TRUE|true|FALSE|false|self)\\b"
- constant: "\\bk[[:alnum]]*\\b"
- constant.string: "'.'"
- constant.string:
start: "@\""
end: "\""
rules:
- constant.specialChar: "\\\\."
- constant.string:
start: "\""
end: "\""
rules:
- constant.specialChar: "\\\\."
- comment:
start: "//"
end: "$"
rules:
- todo: "(TODO|XXX|FIXME):?"
- comment:
start: "/\\*"
end: "\\*/"
rules:
- todo: "(TODO|XXX|FIXME):?"

View File

@@ -1,20 +0,0 @@
syntax "ocaml" "\.mli?$"
# Numbers
## Integers
### Binary
color constant.number "-?0[bB][01][01_]*"
### Octal
color constant.number "-?0[oO][0-7][0-7_]*"
### Decimal
color constant.number "-?\d[\d_]*"
### Hexadecimal
color constant.number "-?0[xX][0-9a-fA-F][0-9a-fA-F_]*"
## Real
### Decimal
color constant.number "-?\d[\d_]*.\d[\d_]*([eE][+-]\d[\d_]*.\d[\d_]*)?"
### Hexadecimal
color constant.number "-?0[xX][0-9a-fA-F][0-9a-fA-F_]*.[0-9a-fA-F][0-9a-fA-F_]*([pP][+-][0-9a-fA-F][0-9a-fA-F_]*.[0-9a-fA-F][0-9a-fA-F_]*)?"
# Comments
color comment start="\(\*" end="\*\)"

26
runtime/syntax/ocaml.yaml Normal file
View File

@@ -0,0 +1,26 @@
filetype: ocaml
detect:
filename: "\\.mli?$"
rules:
# Numbers
## Integers
### Binary
- constant.number: "-?0[bB][01][01_]*"
### Octal
- constant.number: "-?0[oO][0-7][0-7_]*"
### Decimal
- constant.number: "-?\\d[\\d_]*"
### Hexadecimal
- constant.number: "-?0[xX][0-9a-fA-F][0-9a-fA-F_]*"
## Real
### Decimal
- constant.number: "-?\\d[\\d_]*.\\d[\\d_]*([eE][+-]\\d[\\d_]*.\\d[\\d_]*)?"
### Hexadecimal
- constant.number: "-?0[xX][0-9a-fA-F][0-9a-fA-F_]*.[0-9a-fA-F][0-9a-fA-F_]*([pP][+-][0-9a-fA-F][0-9a-fA-F_]*.[0-9a-fA-F][0-9a-fA-F_]*)?"
# Comments
- comment:
start: "\\(\\*"
end: "\\*\\)"
rules: []

View File

@@ -1,23 +0,0 @@
syntax "pascal" "\.pas$"
# color identifier "\b[\pL_][\pL_\pN]*\b"
color 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"
color 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"
color statement "\b(?i:(as|class|dispose|except|exit|exports|finalization|finally|inherited|initialization|is|library|new|on|out|property|raise|self|threadvar|try))\b"
color 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"
color constant "\b(?i:(false|true|nil))\b"
color special start="asm" end="end"
color constant.number "\$[0-9A-Fa-f]+" "\b[+-]?[0-9]+([.]?[0-9]+)?(?i:e[+-]?[0-9]+)?"
color constant.string "#[0-9]{1,}"
color constant.string "'(?:[^']+|'')*'"
color preproc start="{\$" end="}"
color comment "//.*"
color comment start="\(\*" end="\*\)"
color comment start="({)(?:[^$])" end="}"

View File

@@ -0,0 +1,43 @@
filetype: pascal
detect:
filename: "\\.pas$"
rules:
- 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"
- 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"
- statement: "\\b(?i:(as|class|dispose|except|exit|exports|finalization|finally|inherited|initialization|is|library|new|on|out|property|raise|self|threadvar|try))\\b"
- 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"
- constant: "\\b(?i:(false|true|nil))\\b"
- special:
start: "asm"
end: "end"
rules: []
- constant.number: "\\$[0-9A-Fa-f]+"
- constant.number: "\\b[+-]?[0-9]+([.]?[0-9]+)?(?i:e[+-]?[0-9]+)?"
- constant.string:
start: "#[0-9]{1,}"
end: "$"
rules:
- constant.specialChar: "\\\\."
- constant.string:
start: "'"
end: "'"
rules:
- constant.specialChar: "\\\\."
- preproc:
start: "{\\$"
end: "}"
rules: []
- comment:
start: "//"
end: "$"
rules: []
- comment:
start: "\\(\\*"
end: "\\*\\)"
rules: []
- comment:
start: "({)(?:[^$])"
end: "}"
rules: []

View File

@@ -1,10 +0,0 @@
## Here is an example for patch files.
##
syntax "patch" "\.(patch|diff)$"
color brightgreen "^\+.*"
color green "^\+\+\+.*"
color brightblue "^ .*"
color brightred "^-.*"
color red "^---.*"
color brightyellow "^@@.*"
color magenta "^diff.*"

View File

@@ -1,12 +0,0 @@
syntax "peg" "\.l?peg$"
color cyan "^[[:space:]]*[A-Za-z][A-Za-z0-9_]*[[:space:]]*<-"
color blue "\^[+-]?[0-9]+"
color red "[-+*?^/!&]|->|<-|=>"
color brightyellow "%[A-Za-z][A-Za-z0-9_]*"
color magenta "\[[^]]*\]"
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color brightblack "(^|[[:space:]])\-\-.*$"
color brightwhite,cyan "TODO:?"
color ,green "[[:space:]]+$"
color ,red " + +| + +"

View File

@@ -1,13 +0,0 @@
## Here is an example for Perl.
##
syntax "perl" "\.p[lm]$"
header "^#!.*/(env +)?perl( |$)"
color red "\<(accept|alarm|atan2|bin(d|mode)|c(aller|h(dir|mod|op|own|root)|lose(dir)?|onnect|os|rypt)|d(bm(close|open)|efined|elete|ie|o|ump)|e(ach|of|val|x(ec|ists|it|p))|f(cntl|ileno|lock|ork))\>" "\<(get(c|login|peername|pgrp|ppid|priority|pwnam|(host|net|proto|serv)byname|pwuid|grgid|(host|net)byaddr|protobynumber|servbyport)|([gs]et|end)(pw|gr|host|net|proto|serv)ent|getsock(name|opt)|gmtime|goto|grep|hex|index|int|ioctl|join)\>" "\<(keys|kill|last|length|link|listen|local(time)?|log|lstat|m|mkdir|msg(ctl|get|snd|rcv)|next|oct|open(dir)?|ord|pack|pipe|pop|printf?|push|q|qq|qx|rand|re(ad(dir|link)?|cv|do|name|quire|set|turn|verse|winddir)|rindex|rmdir|s|scalar|seek(dir)?)\>" "\<(se(lect|mctl|mget|mop|nd|tpgrp|tpriority|tsockopt)|shift|shm(ctl|get|read|write)|shutdown|sin|sleep|socket(pair)?|sort|spli(ce|t)|sprintf|sqrt|srand|stat|study|substr|symlink|sys(call|read|tem|write)|tell(dir)?|time|tr(y)?|truncate|umask)\>" "\<(un(def|link|pack|shift)|utime|values|vec|wait(pid)?|wantarray|warn|write)\>"
color magenta "\<(continue|else|elsif|do|for|foreach|if|unless|until|while|eq|ne|lt|gt|le|ge|cmp|x|my|sub|use|package|can|isa)\>"
cyan (i) start="[$@%]" end="( |[^0-9A-Z_]|-)"
color yellow "".*"|qq\|.*\|"
color white "[sm]/.*/"
color white start="(^use| = new)" end=";"
color green "#.*"
color yellow start="<< 'STOP'" end="STOP"

View File

@@ -1,16 +0,0 @@
## Here is an example for perl
## Hybrid perl5 / perl6 syntax highlighting
### Found in CPAN - http://cpansearch.perl.org/src/NIGE/Goo-0.09/lib/.gooskel/nanorc
syntax "perl6" "\.p6$"
color brightblue "\<(accept|alarm|atan2|bin(d|mode)|c(aller|h(dir|mod|op|own|root)|lose(dir)?|onnect|os|rypt)|d(bm(close|open)|efined|elete|ie|o|ump)|e(ach|of|val|x(ec|ists|it|p))|f(cntl|ileno|lock|ork)|get(c|login|peername|pgrp|ppid|priority|pwnam|(host|net|proto|serv)byname|pwuid|grgid|(host|net)byaddr|protobynumber|servbyport)|([gs]et|end)(pw|gr|host|net|proto|serv)ent|getsock(name|opt)|gmtime|goto|grep|hex|index|int|ioctl|join|keys|kill|last|length|link|listen|local(time)?|log|lstat|m|mkdir|msg(ctl|get|snd|rcv)|next|oct|open(dir)?|ord|pack|pipe|pop|printf?|push|q|qq|qx|rand|re(ad(dir|link)?|cv|do|name|quire|set|turn|verse|winddir)|rindex|rmdir|s|scalar|seek|seekdir|se(lect|mctl|mget|mop|nd|tpgrp|tpriority|tsockopt)|shift|shm(ctl|get|read|write)|shutdown|sin|sleep|socket(pair)?|sort|spli(ce|t)|sprintf|sqrt|srand|stat|study|substr|symlink|sys(call|read|tem|write)|tell(dir)?|time|tr|y|truncate|umask|un(def|link|pack|shift)|utime|values|vec|wait(pid)?|wantarray|warn|write)\>"
color brightblue "\<(continue|else|elsif|do|for|foreach|if|unless|until|while|eq|ne|lt|gt|le|ge|cmp|x|my|sub|use|package|can|isa)\>"
# Perl 6 words
color brightcyan "\<(has|is|class|role|given|when|BUILD|multi|returns|method|submethod|slurp|say|sub)\>"
color brightmagenta start="[$@%]" end="( |\\W|-)"
color brightred "".*"|qq\|.*\|"
color white "[sm]/.*/"
color brightblue start="(^use| = new)" end=";"
color brightgreen "#.*"
color brightred start="<<EOSQL" end="EOSQL"

View File

@@ -1,32 +0,0 @@
syntax "php" "\.php[2345s~]?$"
color default start="<\?(php|=)?" end="\?>"
color special "([a-zA-Z0-9_-]+)\("
color identifier "(var|class|goto|extends|function|echo|case|break|default|exit|switch|foreach|endforeach|while|const|static|extends|as|require|include|require_once|include_once|define|do|continue|declare|goto|print|in|trait|interface|[E|e]xception|array|int|string|bool|iterable|void)[\s|\)]"
color identifier "[a-zA-Z\\]+::"
color identifier "new\s([a-zA-Z0-9\\]+)"
color identifier "([A-Z][a-zA-Z0-9_]+)\s"
color identifier "([A-Z0-9_]+)[;|\s|\)|,]"
color statement "(implements|abstract|global|public|instanceof|private|protected|static|if|else|elseif|endif|namespace|use|as|new|throw|catch|try|return)[\s|;]"
color constant "(true|false|null|TRUE|FALSE|NULL)"
color constant "[\s|=|>|\s|\(|/|+|-|\*|\[](\d+)"
color identifier "(\$this|parent|self|\$this->)"
color statement "(=>|===|!==|==|!=|&&|\|\||::|=|->|\!)"
color default "(\$[a-zA-Z0-9\-_]+)"
color default "[\(|\)|/|+|-|\*|\[|,|;]"
color constant.string ""(\\.|[^"])*"|'(\\.|[^'])*'"
color constant.specialChar "\\[abfnrtv'\"\\]"
color comment "(^|[[:space:]])//.*"
color comment "(^|[[:space:]])#.*"
color comment start="/\*" end="\*/"

View File

@@ -1,8 +0,0 @@
syntax "pc" "\.pc$"
color cyan "^(Name|Description|URL|Version|Conflicts|Cflags):"
color cyan "^(Requires|Libs)(\.private)?:"
color red "="
color brightyellow "\$\{[A-Za-z_][A-Za-z0-9_]*\}"
color ,green "[[:space:]]+$"
color ,red " + +| + +"

View File

@@ -1,8 +0,0 @@
syntax "po" "\.pot?$"
color cyan "\<(msgid|msgstr)\>"
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color magenta "\\.?"
color brightblack "(^|[[:space:]])#([^{].*)?$"
color ,green "[[:space:]]+$"
color ,red " + +| + +"

View File

@@ -1,31 +0,0 @@
syntax "pony" "\.pony$"
color statement "\b(type|interface|trait|primitive|class|struct|actor)\b"
color statement "\b(compiler_intrinsic)\b"
color statement "\b(use)\b"
color statement "\b(var|let|embed)\b"
color statement "\b(new|be|fun)\b"
color statement "\b(iso|trn|ref|val|box|tag|consume)\b"
color statement "\b(break|continue|return|error)\b"
color statement "\b(if|then|elseif|else|end|match|where|try|with|as|recover|object|lambda|as|digestof|ifdef)\b"
color statement "\b(while|do|repeat|until|for|in)\b"
color statement "(\?|=>)"
color statement "(\||\&|\,|\^)"
color statement "(\-|\+|\*|/|\!|%|<<|>>)"
color statement "(==|!=|<=|>=|<|>)"
color statement "\b(is|isnt|not|and|or|xor)\b"
color type "\b(_*[A-Z][_a-zA-Z0-9\']*)\b"
color constant "\b(this)\b"
color constant "\b(true|false)\b"
color constant.number "\b((0b[0-1_]*)|(0o[0-7_]*)|(0x[0-9a-fA-F_]*)|([0-9_]+(\.[0-9_]+)?((e|E)(\\+|-)?[0-9_]+)?))\b"
color constant.string ""(\\.|[^"])*""
color comment start=""""[^"]*" end="""""
color comment "(^|[[:space:]])//.*"
color comment start="/\*" end="\*/"
color todo "TODO:?"

Some files were not shown because too many files have changed in this diff Show More