Skip to content

Commit

Permalink
fix(lua): update escape and adjust coloring
Browse files Browse the repository at this point in the history
- Numbers and escapes: magenta
  • Loading branch information
davidhcefx committed Feb 25, 2024
1 parent a2833a1 commit c001ce7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lua.nanorc
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ color brightmagenta "\<(false|nil|true)\>"
color brightgreen "(\<(dofile|require|include)|%q|%!|%Q|%r|%x)\>"

# Numbers (hex and decimal with scientific notation)
#color red "\<(0[xX](([0-9A-Fa-f]+\.[0-9A-Fa-f]*)|(\.?[0-9A-Fa-f]+))([pP][-+]?[0-9]+)?)\>"
#color red "\<((([0-9]+\.[0-9]*)|(\.?[0-9]+))([eE][-+]?[0-9]+)?)\>"
color red "\<((0[xX](([0-9A-Fa-f]+\.[0-9A-Fa-f]*)|(\.?[0-9A-Fa-f]+))([pP][-+]?[0-9]+)?)|((([0-9]+\.[0-9]*)|(\.?[0-9]+))([eE][-+]?[0-9]+)?))\>"
#color magenta "\<(0[xX](([0-9A-Fa-f]+\.[0-9A-Fa-f]*)|(\.?[0-9A-Fa-f]+))([pP][-+]?[0-9]+)?)\>"
#color magenta "\<((([0-9]+\.[0-9]*)|(\.?[0-9]+))([eE][-+]?[0-9]+)?)\>"
color magenta "\<((0[xX](([0-9A-Fa-f]+\.[0-9A-Fa-f]*)|(\.?[0-9A-Fa-f]+))([pP][-+]?[0-9]+)?)|((([0-9]+\.[0-9]*)|(\.?[0-9]+))([eE][-+]?[0-9]+)?))\>"

# Symbols
color brightmagenta "(\(|\)|\[|\]|\{|\})"
Expand All @@ -67,7 +67,7 @@ color red "\"(\\.|[^\\\"])*\"|'(\\.|[^\\'])*'"
color red start="\s*\[\[" end="\]\]"

# Escapes
#color red "\\[0-7][0-7][0-7]|\\x[0-9a-fA-F][0-9a-fA-F]|\\[abefnrs]|(\\c|\\C-|\\M-|\\M-\\C-)."
color magenta "\\([abfnrtvz'\"]|[0-9]{1,3}|x[0-9a-fA-F][0-9a-fA-F]|u\{[0-9a-fA-F]+\})"

# Shebang
color brightcyan "^#!.*"
Expand Down

0 comments on commit c001ce7

Please sign in to comment.