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:
32
runtime/syntax/yaml.yaml
Normal file
32
runtime/syntax/yaml.yaml
Normal file
@@ -0,0 +1,32 @@
|
||||
filetype: yaml
|
||||
|
||||
detect:
|
||||
filename: "\\.ya?ml$"
|
||||
header: "%YAML"
|
||||
|
||||
rules:
|
||||
- type: "(^| )!!(binary|bool|float|int|map|null|omap|seq|set|str) "
|
||||
- constant: "\\b(YES|yes|Y|y|ON|on|NO|no|N|n|OFF|off)\\b"
|
||||
- constant: "\\b(true|false)\\b"
|
||||
- statement: "(:[[:space:]]|\\[|\\]|:[[:space:]]+[|>]|^[[:space:]]*- )"
|
||||
- identifier: "[[:space:]][\\*&][A-Za-z0-9]+"
|
||||
- type: "([-\\w]+:\\s+)|([-\\w]+:$)"
|
||||
- special: "(^---|^\\.\\.\\.|^%YAML|^%TAG)"
|
||||
|
||||
- constant.string:
|
||||
start: "\""
|
||||
end: "\""
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
- constant.string:
|
||||
start: "'"
|
||||
end: "'"
|
||||
rules:
|
||||
- constant.specialChar: "\\\\."
|
||||
|
||||
- comment:
|
||||
start: "#"
|
||||
end: "$"
|
||||
rules: []
|
||||
|
||||
Reference in New Issue
Block a user