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

53 lines
1.8 KiB
Plaintext

syntax "java" "\.java$"
# Resets everything back to plain text coloring.
# Can be used at the start of each theme file.
color white "^.*$"
# Class
color red "class +[A-Za-z0-9]+ *((implements|extends) +[A-Za-z0-9.]+)?"
# Annotation
color yellow "@[A-Za-z]+"
color cyan "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]"
color white "[(]"
color blue "\<(boolean|byte|char|double|float|int|long|short|String|void)\>"
color red "\<(case|catch|default|do|else|finally|for|if)\>"
color red "\<(new|return|switch|this|throw|transient|try|while)\>"
color red "\<(abstract|class|extends|final|implements|import|instanceof)\>"
color red "\<(interface|native|package|private|protected|public|static)\>"
color red "\<(strictfp|super|synchronized|throws|volatile|null)\>"
color red "\<(break|continue)\>"
color brightwhite "\<(true|false)\>"
color yellow "[-+/*=<>?:!~%&|]"
color brightwhite "\<([0-9._]+|0x[A-Fa-f0-9_]+|0b[0-1_]+)[FL]?\>"
color green ""(\\.|[^"])*"|'(\\.|[^'])*'"
color yellow "\\([btnfr]|'|\"|\\)"
color yellow "\\u[A-Fa-f0-9]{4}"
color brightblack "(^|[[:space:]])//.*"
color brightblack start="/\*" end="\*/"
comment "//"
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}"