Created
August 26, 2025 06:42
-
-
Save orion55/71fea6cf5c26fc480ad140037cae3993 to your computer and use it in GitHub Desktop.
yaml.nanorc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Supports `YAML` files | |
| syntax "YAML" "\.ya?ml$" | |
| header "^(---|===)" "%YAML" | |
| ## Keys | |
| color magenta "^\s*[\$A-Za-z0-9_-]+\:" | |
| color brightmagenta "^\s*@[\$A-Za-z0-9_-]+\:" | |
| ## Values | |
| color white ":\s.+$" | |
| ## Booleans | |
| icolor brightcyan " (y|yes|n|no|true|false|on|off)$" | |
| ## Numbers | |
| color brightred " [[:digit:]]+(\.[[:digit:]]+)?" | |
| ## Arrays | |
| color red "\[" "\]" ":\s+[|>]" "^\s*- " | |
| ## Reserved | |
| color green "(^| )!!(binary|bool|float|int|map|null|omap|seq|set|str) " | |
| ## Comments | |
| color brightwhite "#.*$" | |
| ## Errors | |
| color ,red ":\w.+$" | |
| color ,red ":'.+$" | |
| color ,red ":".+$" | |
| color ,red "\s+$" | |
| ## Non closed quote | |
| color ,red "['\"][^['\"]]*$" | |
| ## Closed quotes | |
| color yellow "['\"].*['\"]" | |
| ## Equal sign | |
| color brightgreen ":( |$)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment