From 188f55b6f08e455a3d1f8d18dded0a9cab4eb30e Mon Sep 17 00:00:00 2001 From: Ritiek Malhotra Date: Tue, 23 May 2017 20:42:47 +0530 Subject: [PATCH] Add kotlin.nanorc Credits to https://github.com/bjarneh/kotkit/blob/master/misc/syntax/nano/kotlin.nanorc --- kotlin.nanorc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 kotlin.nanorc diff --git a/kotlin.nanorc b/kotlin.nanorc new file mode 100644 index 0000000..ccb8300 --- /dev/null +++ b/kotlin.nanorc @@ -0,0 +1,20 @@ +# Nano syntax file +# Language: Kotlin +# Maintainer: Bjarne Holen +# Last Change: 2012 Feb 14 + +syntax "kotlin" "\.kt$" +color brightred "\<[A-Z_][0-9A-Z_]+\>" +color green "\<(namespace|as|type|class|this|super|val|var|fun|for|null|true|false|is|in|throw|return|break|continue|object|if|try|else|while|do|when|trait|import|where|by|get|set|abstract|enum|open|annotation|override|private|public|internal|protected|catch|out|vararg|inline|finally|final|package)\>" +## +## String highlighting. You will in general want your comments and +## strings to come last, because syntax highlighting rules will be +## applied in the order they are read in. +color blue "<[^= ]*>" ""(\\.|[^"])*"" + +## Comment highlighting +color red "//.*" +color red start="/\*" end="\*/" + +## Trailing whitespace +color ,green "[[:space:]]+$"