Syntax Highlighting with nano – nanorc for lua

syntax "lua" "\.lua$"
color black "def [a-zA-Z_0-9]+"
color brightblue "\<(break|do|else|elseif|end|for|function|if|repeat|return|then|until|while)\>"
color blue "\<(and|or|in|true|false|not|nil|local)\>"
color yellow "\<(module|assert|require|package|error|true|false)\>"
color blue "\+|\-|\*|\/|\%|\^|\#|\=\=|\~\=|\<\=|\>\=|\<|\>|\=|\;|\:|\,|\.|\.\.|\.\.\."
color yellow "\[|\]|\(|\)|\{|\}"
color green "([\"'])[^\"]*?[^\\]\1"
color green start="\[\[" end="\]\]\""
color cyan "\-\-.*$"

Leave a Reply

Your email address will not be published.