mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-25 18:07:07 +09:00
Merge
This commit is contained in:
@@ -5,18 +5,18 @@ detect:
|
||||
|
||||
rules:
|
||||
- type: "(?i)\\b(action|advance|all|allocatable|allocated|any|apostrophe)\\b"
|
||||
- type: "(?i)\\b(append|asis|assign|assignment|associated|character|common)\\b"
|
||||
- type: "(?i)\\b(append|asis|assign|assignment|associated|bind|character|common)\\b"
|
||||
- type: "(?i)\\b(complex|data|default|delim|dimension|double precision)\\b"
|
||||
- type: "(?i)\\b(elemental|epsilon|external|file|fmt|form|format|huge)\\b"
|
||||
- type: "(?i)\\b(elemental|enum|enumerator|epsilon|external|file|fmt|form|format|huge)\\b"
|
||||
- type: "(?i)\\b(implicit|include|index|inquire|integer|intent|interface)\\b"
|
||||
- type: "(?i)\\b(intrinsic|iostat|kind|logical|module|none|null|only)\\\\b"
|
||||
- type: "(?i)\\b(operator|optional|pack|parameter|pointer|position|private)\\b"
|
||||
- type: "(?i)\\b(program|public|real|recl|recursive|selected_int_kind)\\b"
|
||||
- type: "(?i)\\b(selected_real_kind|subroutine|status)\\b"
|
||||
- type: "(?i)\\b(selected_real_kind|subroutine|status|module|function|logical)\\b"
|
||||
|
||||
- constant: "(?i)\\b(abs|achar|adjustl|adjustr|allocate|bit_size|call|char)\\b"
|
||||
- constant: "(?i)\\b(close|contains|count|cpu_time|cshift|date_and_time)\\b"
|
||||
- constant: "(?i)\\b(deallocate|digits|dot_product|eor|eoshift|function|iachar)\\b"
|
||||
- constant: "(?i)\\b(deallocate|digits|dot_product|eor|eoshift|iachar)\\b"
|
||||
- constant: "(?i)\\b(iand|ibclr|ibits|ibset|ichar|ieor|iolength|ior|ishft|ishftc)\\b"
|
||||
- constant: "(?i)\\b(lbound|len|len_trim|matmul|maxexponent|maxloc|maxval|merge)\\b"
|
||||
- constant: "(?i)\\b(minexponent|minloc|minval|mvbits|namelist|nearest|nullify)\\b"
|
||||
@@ -24,16 +24,18 @@ rules:
|
||||
- constant: "(?i)\\b(random_number|random_seed|range|read|readwrite|replace)\\b"
|
||||
- constant: "(?i)\\b(reshape|rewind|save|scan|sequence|shape|sign|size|spacing)\\b"
|
||||
- constant: "(?i)\\b(spread|sum|system_clock|target|transfer|transpose|trim)\\b"
|
||||
- constant: "(?i)\\b(ubound|unpack|verify|write|tiny|type|use|yes)\\b"
|
||||
- constant: "(?i)\\b(ubound|unpack|verify|write|tiny|type|use|yes|true|false|not)\\b"
|
||||
|
||||
- constant.number: "\\b([0-9]+)\\b"
|
||||
|
||||
- statement: "(?i)\\b(.and.|case|do|else|else?if|else?where|end|end?do|end?if)\\b"
|
||||
- statement: "(?i)\\b(end?select|.eqv.|forall|if|lge|lgt|lle|llt|.neqv.|.not.)\\b"
|
||||
- statement: "(?i)\\b(.or.|repeat|select case|then|where|while)\\b"
|
||||
- statement: "(?i)\\b(or|and|repeat|select|case|then|where|while|import)\\b"
|
||||
|
||||
- special: "(?i)\\b(continue|cycle|exit|go?to|result|return)\\b"
|
||||
|
||||
#Operator Color
|
||||
- symbol.operator: "[.:;,+*|=!\\%]|/|-|&"
|
||||
- symbol.operator: "[.:;,+*|=!\\%]|/|-|>|<|&"
|
||||
|
||||
#Parenthetical Color
|
||||
- symbol.bracket: "[(){}]|\\[|\\]"
|
||||
@@ -60,4 +62,3 @@ rules:
|
||||
end: "$"
|
||||
rules:
|
||||
- todo: "(TODO|XXX|FIXME):?"
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ detect:
|
||||
|
||||
rules:
|
||||
# Rebase commands
|
||||
- statement: "^(p(ick)?|r(eword)?|e(dit)?|s(quash)?|f(ixup)?|x|exec|d(rop)?)\\b"
|
||||
- statement: "^(p(ick)?|r(eword)?|e(dit)?|s(quash)?|f(ixup)?|x|exec|b(reak)?|d(rop)?|l(abel)?|t|reset|m(erge)?)\\b"
|
||||
# Commit IDs
|
||||
- identifier: "\\b([0-9a-f]{7,40})\\b"
|
||||
|
||||
|
||||
15
runtime/syntax/gnuplot.yaml
Normal file
15
runtime/syntax/gnuplot.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
filetype: gnuplot
|
||||
|
||||
detect:
|
||||
filename: "\\.(gnu|gpi|plt|gp)$"
|
||||
|
||||
rules:
|
||||
- statement: "\\b(set|unset|plot|splot|replot|if|else|do|for|while|fit)\\b"
|
||||
- symbol.operator: "[-+/*=<>?:!~%&|^$]"
|
||||
- constant.number: "\\b([0-9]+|0x[0-9a-fA-F]*)\\b"
|
||||
|
||||
- comment:
|
||||
start: "#"
|
||||
end: "$"
|
||||
rules:
|
||||
- todo: "TODO:?"
|
||||
52
runtime/syntax/hc.yaml
Normal file
52
runtime/syntax/hc.yaml
Normal file
@@ -0,0 +1,52 @@
|
||||
filetype: hc
|
||||
|
||||
detect:
|
||||
filename: "(\\.(hc|HC)$|\\.(hh|HH)$|\\.ii?$|\\.(def)$)"
|
||||
|
||||
rules:
|
||||
- identifier: "\\b[A-Z_][0-9A-Z_]+\\b"
|
||||
- type: "\\b(F64|I8|U8|I16|U16|I32|U32|I64|U64|sizeof|enum|U0|static|extern|struct|union|class|intern|public|argc|argv|asm)\\b"
|
||||
|
||||
- statement: "\\b(for|if|while|do|else|case|default|switch)\\b"
|
||||
- statement: "\\b(try|catch|throw|goto|continue|break|return)\\b"
|
||||
- preproc: "^[[:space:]]*#[[:space:]]*(define|pragma|include|(un|ifn?)def|endif|el(if|se)|if|help_index|ifjit|ifaot|exe)"
|
||||
|
||||
# Operator Color
|
||||
- symbol.operator: "([.:;,+*|=!\\%]|<|>|/|-|&)"
|
||||
- symbol.brackets: "[(){}]|\\[|\\]"
|
||||
# Integer Constants
|
||||
- constant.number: "(\\b([1-9][0-9]*|0[0-7]*|0[Xx][0-9A-Fa-f]+|0[Bb][01]+)([Uu]?[Ll][Ll]?|[Ll][Ll]?[Uu]?)?\\b)"
|
||||
# Decimal Floating Constants
|
||||
- constant.number: "(\\b(([0-9]*[.][0-9]+|[0-9]+[.][0-9]*)([Ee][+-]?[0-9]+)?|[0-9]+[Ee][+-]?[0-9]+)[FfLl]?\\b)"
|
||||
# Hexadecimal Floating Constants
|
||||
- constant.number: "(\\b0[Xx]([0-9A-Za-z]*[.][0-9A-Za-z]+|[0-9A-Za-z]+[.][0-9A-Za-z]*)[Pp][+-]?[0-9]+[FfLl]?\\b)"
|
||||
- constant.number: "NULL"
|
||||
- constant.number: "TRUE"
|
||||
- constant.number: "FALSE"
|
||||
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "\""
|
||||
skip: "\\\\."
|
||||
rules:
|
||||
- constant.specialChar: "\\\\([\"'abfnrtv\\\\]|[0-3]?[0-7]{1,2}|x[0-9A-Fa-f]{1,2}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})"
|
||||
|
||||
- constant.string:
|
||||
start: "'"
|
||||
end: "'"
|
||||
skip: "\\\\."
|
||||
rules:
|
||||
- error: "..+"
|
||||
- constant.specialChar: "\\\\([\"'abfnrtv\\\\]|[0-3]?[0-7]{1,2}|x[0-9A-Fa-f]{1,2}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})"
|
||||
|
||||
- comment:
|
||||
start: "//"
|
||||
end: "$"
|
||||
rules:
|
||||
- todo: "(TODO|XXX|FIXME):?"
|
||||
|
||||
- comment:
|
||||
start: "/\\*"
|
||||
end: "\\*/"
|
||||
rules:
|
||||
- todo: "(TODO|XXX|FIXME):?"
|
||||
@@ -22,7 +22,7 @@ rules:
|
||||
- statement: "\\b(get|if|import|from|in|of|instanceof|let|new|reject|resolve|return)\\b"
|
||||
- statement: "\\b(set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\\b"
|
||||
# reserved but unassigned
|
||||
- error: "\\b(enum|implements|interface|package|private|protected|public)"
|
||||
- error: "\\b(enum|implements|interface|package|private|protected|public)\\b"
|
||||
- constant: "\\b(globalThis|Infinity|null|undefined|NaN)\\b"
|
||||
- constant: "\\b(null|undefined|NaN)\\b"
|
||||
- constant: "\\b(true|false)\\b"
|
||||
|
||||
@@ -25,3 +25,8 @@ rules:
|
||||
start: "#"
|
||||
end: "$"
|
||||
rules: []
|
||||
|
||||
- comment:
|
||||
start: "/\\*"
|
||||
end: "\\*/"
|
||||
rules: []
|
||||
|
||||
114
runtime/syntax/nu.yaml
Normal file
114
runtime/syntax/nu.yaml
Normal file
@@ -0,0 +1,114 @@
|
||||
filetype: nu
|
||||
|
||||
detect:
|
||||
filename: "\\.nu$"
|
||||
|
||||
rules:
|
||||
- symbol: "[-+/*=<>!~%?:&|]"
|
||||
# https://www.nushell.sh/book/command_reference.html
|
||||
- statement: "\\b(agg-groups|agg|alias|all-false|all-true|all?|ansi gradient)\\b"
|
||||
- statement: "\\b(ansi strip|ansi|any?|append|append|arg-max)\\b"
|
||||
- statement: "\\b(arg-min|arg-sort|arg-true|arg-unique|as-date)\\b"
|
||||
- statement: "\\b(as-datetime|as|benchmark|build-string|cache|cal|cd)\\b"
|
||||
- statement: "\\b(char|clear|col|collect|columns|compact|complete)\\b"
|
||||
- statement: "\\b(concatenate|config|config env|config nu|contains)\\b"
|
||||
- statement: "\\b(count|count-null|cp|cumulative|date format|date humanize)\\b"
|
||||
- statement: "\\b(date list-timezone|date now|date to-record|date to-table)\\b"
|
||||
- statement: "\\b(date to-timezone|date|db and|db as|db col|db collect)\\b"
|
||||
- statement: "\\b(db describe|db fn|db from|db group-by|db join|db limit)\\b"
|
||||
- statement: "\\b(db open|db or|db order-by|db over|db query|db schema)\\b"
|
||||
- statement: "\\b(db select|db testing|db where|db|debug|decode)\\b"
|
||||
- statement: "\\b(def-env|default|def|describe|describe|detect columns)\\b"
|
||||
- statement: "\\b(df-not|do|drop|drop|drop column|drop nth|drop-duplicates)\\b"
|
||||
- statement: "\\b(drop-nulls|dtypes|du|each while|each|echo|empty?)\\b"
|
||||
- statement: "\\b(enter|env|error make|every|exec|exit|explode)\\b"
|
||||
- statement: "\\b(export alias|export def|export def-env|export env)\\b"
|
||||
- statement: "\\b(export extern|export|expr-not|extern|fetch|fill-na)\\b"
|
||||
- statement: "\\b(fill-null|filter-with|find|first|flatten)\\b"
|
||||
- statement: "\\b(fmt|format filesize|format|for|from csv|from eml)\\b"
|
||||
- statement: "\\b(from ics|from ini|from json|from nuon|from ods|from ssv)\\b"
|
||||
- statement: "\\b(from toml|from tsv|from url|from vcf|from xlsx|from xml)\\b"
|
||||
- statement: "\\b(from yaml|from yml|from|get-day|get-hour|get-minute)\\b"
|
||||
- statement: "\\b(get-month|get-nanosecond|get-ordinal|get-second|get-week)\\b"
|
||||
- statement: "\\b(get-weekday|get-year|get|glob|grid|group-by)\\b"
|
||||
- statement: "\\b(group|gstat|g|hash base64|hash md5|hash sha256|hash)\\b"
|
||||
- statement: "\\b(headers|help|hide|histogram|history|if|ignore)\\b"
|
||||
- statement: "\\b(inc|input|insert|into binary|into bool|into datetime|into decimal)\\b"
|
||||
- statement: "\\b(into duration|into filesize|into int|into string|into)\\b"
|
||||
- statement: "\\b(is-admin|is-duplicated|is-in|is-not-null)\\b"
|
||||
- statement: "\\b(is-null|is-unique|join|keep|keep until)\\b"
|
||||
- statement: "\\b(keep while|keybindings default|keybindings listen|keybindings list)\\b"
|
||||
- statement: "\\b(keybindings|kill|last|length|let-env|let)\\b"
|
||||
- statement: "\\b(lines|list|lit|load-env|ls|ls-df|match|math abs)\\b"
|
||||
- statement: "\\b(math avg|math ceil|math eval|math floor|math max)\\b"
|
||||
- statement: "\\b(math median|math min|math mode|math product|math round)\\b"
|
||||
- statement: "\\b(math sqrt|math stddev|math sum|math variance|math|max)\\b"
|
||||
- statement: "\\b(mean|median|melt|merge|metadata)\\b"
|
||||
- statement: "\\b(min|mkdir|module|move|mv|n|n-unique|n-unique)\\b"
|
||||
- statement: "\\b(nth|nu-highlight|open|open-df|otherwise|overlay)\\b"
|
||||
- statement: "\\b(overlay add|overlay list|overlay new|overlay remove|p)\\b"
|
||||
- statement: "\\b(par-each|parse|path basename|path dirname|path exists)\\b"
|
||||
- statement: "\\b(path expand|path join|path parse|path relative-to|path split)\\b"
|
||||
- statement: "\\b(path type|path|pivot|post|prepend|print|ps|quantile)\\b"
|
||||
- statement: "\\b(quantile|query json|query web|query xml|query|random bool)\\b"
|
||||
- statement: "\\b(random chars|random decimal|random dice|random integer)\\b"
|
||||
- statement: "\\b(random uuid|random|range|reduce|register|reject|rename)\\b"
|
||||
- statement: "\\b(replace|replace-all|reverse|reverse|rm|roll down)\\b"
|
||||
- statement: "\\b(roll left|roll right|roll up|rolling|roll|rotate)\\b"
|
||||
- statement: "\\b(run-external|sample|save|select|select|seq|seq char)\\b"
|
||||
- statement: "\\b(seq date|set|set-with-idx|shape|shells|shift|shuffle)\\b"
|
||||
- statement: "\\b(size|skip until|skip while|skip|sleep|slice|sort)\\b"
|
||||
- statement: "\\b(sort-by|source|split chars|split column|split row)\\b"
|
||||
- statement: "\\b(split-by|split|std|std|str camel-case|str capitalize)\\b"
|
||||
- statement: "\\b(str collect|str contains|str downcase|str ends-with|str find-replace)\\b"
|
||||
- statement: "\\b(str index-of|str kebab-case|str length|str lpad|str pascal-case)\\b"
|
||||
- statement: "\\b(str replace|str reverse|str rpad|str screaming-snake-case)\\b"
|
||||
- statement: "\\b(str snake-case|str starts-with|str substring|str title-case)\\b"
|
||||
- statement: "\\b(str to-datetime|str to-decimal|str to-int|str trim|str upcase)\\b"
|
||||
- statement: "\\b(str-lengths|str-slice|strftime|str|sum|sys|table)\\b"
|
||||
- statement: "\\b(take until|take while|take|term size|to csv)\\b"
|
||||
- statement: "\\b(to html|to json|to md|to nuon|to text|to toml|to tsv)\\b"
|
||||
- statement: "\\b(to url|to xml|to yaml|to-csv|to-df|to-dummies|to-lazy)\\b"
|
||||
- statement: "\\b(to-lowercase|to-nu|to-parquet|to-uppercase|touch|to)\\b"
|
||||
- statement: "\\b(transpose|tutor|unalias|uniq|unique|update|update cells)\\b"
|
||||
- statement: "\\b(upsert|url host|url path|url query|url scheme|url)\\b"
|
||||
- statement: "\\b(use|value-counts|var|version|view-source|watch)\\b"
|
||||
- statement: "\\b(when|where|which|window|with-column|with-env|wrap)\\b"
|
||||
# https://www.nushell.sh/book/types_of_data.html#booleans
|
||||
- constant: "\\b(false|true)\\b"
|
||||
- constant.number: "\\b[-+]?([1-9][0-9])*\\b"
|
||||
# https://www.nushell.sh/book/types_of_data.html#binary-data
|
||||
- constant.number: "\\b[-+]?(0(x|b|o)\\[[0-9a-fA-F ]+\\])"
|
||||
# https://www.nushell.sh/book/types_of_data.html#file-sizes
|
||||
- constant.number: "\\b[-+]?([0-9]+[BbMmGgTtPp][i]?[Bb]?)?\\b"
|
||||
# https://www.nushell.sh/book/types_of_data.html#duration
|
||||
- constant.number: "\\b[-+]?([0-9]+[num]?[s])?\\b"
|
||||
- constant.number: "\\b[-+]?([0-9]+(sec|min|hr|day|wk))?\\b"
|
||||
# https://www.nushell.sh/book/types_of_data.html#dates
|
||||
- constant.number: "\\b([0-9]+[-][0-9]+[-][0-9]+([T][0-9]+[:][0-9]+[:][0-9]+)?([\\+][0-9]+[:][0-9]+)?)\\b"
|
||||
# https://www.nushell.sh/book/types_of_data.html#ranges
|
||||
- constant.number: "([0-9]+(\\.\\.)[0-9]+)?"
|
||||
# https://www.nushell.sh/book/types_of_data.html#open-ended-ranges
|
||||
- constant.number: "((\\.\\.)[0-9]+)?"
|
||||
- constant.number: "([0-9]+(\\.\\.))?"
|
||||
- comment:
|
||||
start: "#"
|
||||
end: "$"
|
||||
rules: []
|
||||
- comment:
|
||||
start: "/\\*"
|
||||
end: "\\*/"
|
||||
rules:
|
||||
- todo: "(FIXME|TODO|NOTE):?"
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "\""
|
||||
skip: "\\\\."
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
- constant.string:
|
||||
start: "'"
|
||||
end: "'"
|
||||
skip: "\\\\."
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
@@ -17,14 +17,14 @@ rules:
|
||||
- comment: "<!--.+?-->"
|
||||
- default: "<\\?(php|=)\" end=\"\\?>"
|
||||
- identifier.class: "([a-zA-Z0-9_-]+)\\("
|
||||
- type: "\\b(array|bool(ean)?|callable|callback|float|int(eger)?|iterable|object|resource|mixed|string|void)\\b"
|
||||
- type: "\\b(array|bool|callable|float|int|iterable|object|mixed|string|void)\\b"
|
||||
- identifier.class: "[a-zA-Z\\\\]+::"
|
||||
- identifier: "\\b([A-Z][a-zA-Z0-9_]+)\\b"
|
||||
- identifier: "([A-Z0-9_]+)[;|\\s|\\)|,]"
|
||||
- type.keyword: "\\b(global|final|public|private|protected|static|const|var)\\b"
|
||||
- statement: "\\b(abstract|catch|class|declare|do|else(if)?|end(declare|for(each)?|if|switch|while)|finally|for(each)|function|if|interface|namespace|switch|trait|try|while)\\b"
|
||||
- statement: "\\b(abstract|catch|class|declare|do|else(if)?|end(declare|for(each)?|if|switch|while)|enum|finally|for(each)|function|if|interface|namespace|switch|trait|try|while)\\b"
|
||||
- identifier: "\\bnew\\s+([a-zA-Z0-9\\\\]+)"
|
||||
- special: "\\b(as|and|break|case|clone|continue|default|die|fn|echo|empty|eval|exit|extends|goto|or|include(_once)?|implements|instanceof|insteadof|isset|list|new|print|return|require(_once)?|unset|use|throw|xor|yield(\\s+from))\\b"
|
||||
- special: "\\b(as|and|break|case|clone|continue|default|die|fn|echo|empty|eval|exit|extends|goto|or|include(_once)?|implements|instanceof|insteadof|isset|list|match|new|print|return|require(_once)?|unset|use|throw|xor|yield(\\s+from))\\b"
|
||||
- constant.bool: "\\b(true|false|null|TRUE|FALSE|NULL)\\b"
|
||||
- constant: "[\\s|=|\\s|\\(|/|+|-|\\*|\\[]"
|
||||
- constant.number: "[0-9]"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
filetype: scala
|
||||
|
||||
detect:
|
||||
filename: "\\.scala$"
|
||||
filename: "\\.sc(ala)?$"
|
||||
|
||||
rules:
|
||||
- type: "\\b(boolean|byte|char|double|float|int|long|new|short|this|transient|void)\\b"
|
||||
|
||||
Reference in New Issue
Block a user