[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#801103: nano: Syntax highlighting for Groovy files



Package: nano
Version: 2.4.2-1
Severity: wishlist
Tags: patch

Dear Maintainer,

Could you please consider adding syntax highlighting for Groovy files?
This language is increasingly popular in the Java ecosystem, and several
packages now use Groovy based build files. Proper syntax highlighting would
make editing these files easier.

Thank you,

Emmanuel Bourg
## Here is an example for Groovy.

syntax "groovy" "\.(groovy|gradle)$"

# Keywords
color brightblue "\<(boolean|byte|char|double|enum|float|int|long|new|short|super|this|transient)\>"
color brightblue "\<(as|assert|break|case|catch|continue|default|do|else|finally|for|goto|if|in|return|switch|throw|try|while)\>"
color brightblue "\<(abstract|class|extends|implements|import|interface|native|package|private|protected|public|static|strictfp|synchronized|throws|trait|void|volatile)\>"
color brightblue "\<(const|def|final|instanceof)\>"
color brightblue "\<(true|false|null)\>"

# Strings
color brightyellow ""(\\.|[^"])*"" "'(\\.|[^'])*'"

# Interpolation
icolor yellow "\$\{[^\}]*}"

# Comments
color cyan "^//.*"
color cyan "\s//.*"
color cyan start="^/\*(\*)?" end="\*/"
color cyan start="\s/\*(\*)?" end="\*/"

# Trailing whitespace
color ,green "[[:space:]]+$"

Reply to: