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

46 lines
1.7 KiB
Plaintext

syntax "lua" "\.lua$"
header "^#!.*lua(jit)?$"
# Resets everything back to plain text coloring.
# Can be used at the start of each theme file.
color white "^.*$"
color cyan "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*([({'"]|\[=*\[)"
color red "\<(do|end|while|repeat|until|if|elseif|then|else)\>"
color red "\<(for|in|function|local|return|nil)\>"
color red "\<(goto|break)\>"
color brightwhite "\<(true|false)\>"
color yellow "[-+:*/%^=#<>]|~=|\.\.|\[|\]|\<(not|and|or)\>"
color brightyellow "[`!@$&|?]|!="
color white "\.{3,}|[({'"]"
color brightwhite "\<([0-9]+)(\.[0-9]+)?([Ee][+-]?[0-9]+)?\>|0x[0-9a-fA-F]*"
color red "::[A-Za-z_][A-Za-z0-9_]*::"
color green ""(\\.|[^"])*"|'(\\.|[^'])*'"
color yellow "\\([0-9]{1,3}|x[A-Fa-f0-9]{2}|[abefntrv'"\\]|\[|\])"
color green start="\[\[" end="\]\]"
color green start="\[=\[" end="\]=\]"
color green start="\[==\[" end="\]==\]"
color brightblack "^#!.*" "(^|[[:space:]])\-\-.*$"
color brightblack start="\-\-\[\[" end="\]\]"
color brightwhite,cyan "\<TODO\>:?"
color brightwhite,cyan "\<FIXME\>:?"
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}"