From b50db7f96e56fd68acf816728a8ecc2b32297eb5 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Fri, 20 Sep 2019 01:22:44 +0530 Subject: [PATCH] Add Gradle syntax highlighting Taken from https://lists.debian.org/debian-java/2015/10/msg00019.html Signed-off-by: Harsh Shandilya --- gradle.nanorc | 23 +++++++++++++++++++++++ nanorc | 1 + 2 files changed, 24 insertions(+) create mode 100644 gradle.nanorc diff --git a/gradle.nanorc b/gradle.nanorc new file mode 100644 index 0000000..58d7376 --- /dev/null +++ b/gradle.nanorc @@ -0,0 +1,23 @@ +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:]]+$" diff --git a/nanorc b/nanorc index 812d6b9..84a810e 100644 --- a/nanorc +++ b/nanorc @@ -24,6 +24,7 @@ include "~/.nano/git.nanorc" include "~/.nano/gitcommit.nanorc" include "~/.nano/glsl.nanorc" include "~/.nano/go.nanorc" +include "~/.nano/gradle.nanorc" include "~/.nano/groff.nanorc" include "~/.nano/haml.nanorc" include "~/.nano/haskell.nanorc"