mirror of
https://github.com/zyedidia/micro.git
synced 2026-02-04 22:20:20 +09:00
Merge branch 'master' into master
This commit is contained in:
@@ -27,6 +27,7 @@ rules:
|
||||
- constant.string:
|
||||
start: "'"
|
||||
end: "'"
|
||||
skip: "\\\\."
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
# Keywords
|
||||
|
||||
38
runtime/syntax/elm.yaml
Normal file
38
runtime/syntax/elm.yaml
Normal file
@@ -0,0 +1,38 @@
|
||||
filetype: elm
|
||||
|
||||
detect:
|
||||
filename: "\\.elm$"
|
||||
|
||||
rules:
|
||||
- statement: "\\b(as|alias|case|else|exposing|if|import|in|let|module|of|port|then|type|)\\b"
|
||||
- statement: "(\\=|\\:|\\->)"
|
||||
- type: "\\b([A-Z][A-Za-z\\d]*)\\b"
|
||||
- identifier: "^([a-z][A-Za-z\\d]*)\\b"
|
||||
- constant.string:
|
||||
start: "\"\"\""
|
||||
end: "\"\"\""
|
||||
skip: "\\\\."
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "\""
|
||||
skip: "\\\\."
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
- constant.string:
|
||||
start: "'"
|
||||
end: "'"
|
||||
skip: "\\\\."
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
- comment:
|
||||
start: "--"
|
||||
end: "$"
|
||||
rules:
|
||||
- todo: "(TODO|XXX|FIXME):?"
|
||||
- comment:
|
||||
start: "\\{-"
|
||||
end: "-\\}"
|
||||
rules:
|
||||
- todo: "(TODO|XXX|FIXME):?"
|
||||
@@ -23,6 +23,7 @@ rules:
|
||||
# reserved but unassigned
|
||||
- error: "\\b(enum|implements|interface|package|private|protected|public|TODO)"
|
||||
- constant: "\\b(globalThis|Infinity|null|undefined|NaN)\\b"
|
||||
- constant: "\\b(null|undefined|NaN)\\b"
|
||||
- constant: "\\b(true|false)\\b"
|
||||
- type: "\\b(Array|Boolean|Date|Enumerator|Error|Function|Math|Map|Set|WeakMap|WeakSet)\\b"
|
||||
- type: "\\b(Number|Object|RegExp|String)\\b"
|
||||
|
||||
@@ -21,9 +21,9 @@ rules:
|
||||
# parentheses
|
||||
- symbol.brackets: "([(){}]|\\[|\\])"
|
||||
# numbers
|
||||
- constant.number: "\\b[0-9]+\\b"
|
||||
- constant.number: "\\b([0-9]+(_[0-9]+)*|0x[0-9a-fA-F]+(_[0-9a-fA-F]+)*|0b[01]+(_[01]+)*|0o[0-7]+(_[0-7]+)*)\\b"
|
||||
|
||||
- constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
|
||||
- constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^']){1}'"
|
||||
|
||||
- constant.string:
|
||||
start: "\"\"\""
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
filetype: nim
|
||||
|
||||
detect:
|
||||
filename: "\\.nim$"
|
||||
filename: "\\.nim$|\\.nims$|nim.cfg"
|
||||
|
||||
rules:
|
||||
- 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[\\}\\|]"
|
||||
|
||||
24
runtime/syntax/vue.yaml
Normal file
24
runtime/syntax/vue.yaml
Normal file
@@ -0,0 +1,24 @@
|
||||
filetype: vue
|
||||
|
||||
detect:
|
||||
filename: "\\.vue$"
|
||||
|
||||
rules:
|
||||
- default:
|
||||
start: "<template.*?>"
|
||||
end: "</template.*?>"
|
||||
rules:
|
||||
- include: "html5"
|
||||
|
||||
- default:
|
||||
start: "<script.*?>"
|
||||
end: "</script.*?>"
|
||||
rules:
|
||||
- include: "javascript"
|
||||
|
||||
- default:
|
||||
start: "<style.*?>"
|
||||
end: "</style.*?>"
|
||||
rules:
|
||||
- include: "css"
|
||||
|
||||
37
runtime/syntax/zig.yaml
Normal file
37
runtime/syntax/zig.yaml
Normal file
@@ -0,0 +1,37 @@
|
||||
filetype: zig
|
||||
|
||||
detect:
|
||||
filename: "\\.zig$"
|
||||
|
||||
rules:
|
||||
# function definition
|
||||
- identifier: "fn [a-z0-9_]+"
|
||||
# Reserved words
|
||||
- statement: "\\b(align|and|allowzero|anyerror|asm|async|await|break|cancel|catch|comptime|const|continue|defer|else|enum|errdefer|error|export|extern|false|fn|for|if|inline|nakedcc|noalias|null|or|orelse|packed|promise|pub|resume|return|linksection|stdcallcc|struct|suspend|switch|test|threadlocal|true|try|undefined|union|unreachable|use|var|volatile|while)\\b"
|
||||
# builtin functions
|
||||
- special: "@+[a-z_]+"
|
||||
# Constants
|
||||
- constant: "[A-Z][A-Z_]+([0-9]+)?"
|
||||
# Numbers (hexadecimal + decimal)
|
||||
- constant.number: "\\b(0x[A-F0-9]+|[0-9]+)\\b"
|
||||
# Primitive Types / Derived Data Types
|
||||
- type: "([A-Z][a-z]+|(i8|u8|i16|u16|i32|u32|i64|u64|i128|u128|isize|usize|c_short|c_ushort|c_int|c_uint|c_long|c_ulong|c_longlong|c_ulonglong|c_longdouble|c_void|f16|f32|f64|f128|bool|void|noreturn|type|anyerror|comptime_int|comptime_float))"
|
||||
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "\""
|
||||
skip: "\\\\."
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
- comment:
|
||||
start: "//"
|
||||
end: "$"
|
||||
rules:
|
||||
- todo: "(TODO|XXX|FIXME):?"
|
||||
|
||||
- comment:
|
||||
start: "/\\*"
|
||||
end: "\\*/"
|
||||
rules:
|
||||
- todo: "(TODO|XXX|FIXME):?"
|
||||
Reference in New Issue
Block a user