mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-29 22:27:13 +09:00
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:
39
runtime/syntax/toml.yaml
Normal file
39
runtime/syntax/toml.yaml
Normal file
@@ -0,0 +1,39 @@
|
||||
filetype: toml
|
||||
|
||||
detect:
|
||||
filename: "\\.toml"
|
||||
|
||||
rules:
|
||||
- statement: "(.*)[[:space:]]="
|
||||
- special: "="
|
||||
|
||||
# Bracket thingies
|
||||
- special: "(\\[|\\])"
|
||||
|
||||
# Numbers and strings
|
||||
- constant.number: "\\b([0-9]+|0x[0-9a-fA-F]*)\\b|'.'"
|
||||
- constant.number: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})"
|
||||
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
- constant.string:
|
||||
start: "'"
|
||||
end: "'"
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
- constant.string:
|
||||
start: "`"
|
||||
end: "`"
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
- comment:
|
||||
start: "#"
|
||||
end: "$"
|
||||
rules:
|
||||
- todo: "(TODO|XXX|FIXME):?"
|
||||
Reference in New Issue
Block a user