dotfiles-pub/common/nano/syntax/zig.nanorc

30 lines
1.2 KiB
Text

syntax "Zig" "\.zig$$"
color green "\<(align|allowzero|and|anyframe|anytype|asm|async|await|break|catch|comptime|const|continue|defer|else|enum|errdefer|error|export|extern|fn|for|if|inline|noalias|nosuspend|or|orelse|packed|pub|resume|return|linksection|struct|suspend|switch|test|threadlocal|try|union|unreachable|usingnamespace|var|volatile|while)\>"
color brightcyan "@[a-zA-Z]+[0-9]{0,2}"
color cyan "(true|false|null|undefined)"
color cyan "\<(0[xob])?([0-9]_?)+\>"
color blue "\<([iu][0-9]{1,5}|f16|f32|f64|f128)\>"
color magenta "\"[^\"]*\""
comment "//"
tabgives " "
color ,red "[[:space:]]+$"
color brightyellow " + +| + +"
# rainbow indent
color ,brightblack "^[[:space:]]{32}"
color ,black "^[[:space:]]{30}"
color ,brightblack "^[[:space:]]{28}"
color ,black "^[[:space:]]{26}"
color ,brightblack "^[[:space:]]{24}"
color ,black "^[[:space:]]{22}"
color ,brightblack "^[[:space:]]{20}"
color ,black "^[[:space:]]{18}"
color ,brightblack "^[[:space:]]{16}"
color ,black "^[[:space:]]{14}"
color ,brightblack "^[[:space:]]{12}"
color ,black "^[[:space:]]{10}"
color ,brightblack "^[[:space:]]{8}"
color ,black "^[[:space:]]{6}"
color ,brightblack "^[[:space:]]{4}"
color ,black "^[[:space:]]{2}"