44 lines
1.7 KiB
Text
44 lines
1.7 KiB
Text
# Nano syntax file
|
|
# Language: Kotlin
|
|
# Maintainer: Bjarne Holen <bjarneholen@gmail.com>
|
|
# Edited by: Ritiek Malhotra <ritiekmalhotra123@gmail.com>
|
|
# Last Change: 2017 May 24
|
|
# Copyright (c) 2014, Bjarne Holen
|
|
|
|
syntax "kotlin" "\.kt$" "\.kts$"
|
|
color magenta "\b(([1-9][0-9]+)|0+)\.[0-9]+\b" "\b[1-9][0-9]*\b" "\b0[0-7]*\b" "\b0x[1-9a-f][0-9a-f]*\b"
|
|
color yellow "[.:;,+*|=!\%@]" "<" ">" "/" "-" "&"
|
|
color green "\<(namespace|as|type|class|this|super|val|var|fun|is|in|object|when|trait|import|where|by|get|set|abstract|enum|open|annotation|override|private|public|internal|protected|out|vararg|inline|final|package|lateinit|constructor|companion|const|suspend|sealed)\>"
|
|
color yellow "\<(true|false|null)\>"
|
|
color cyan "\<(break|catch|continue|do|else|finally|for|if|return|throw|try|while|repeat)\>"
|
|
color brightred "\<(inner|outer)\>"
|
|
##
|
|
## 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 brightblue "<[^= ]*>" ""(\\.|[^"])*""
|
|
|
|
## Comment highlighting
|
|
color red "^\s*//.*"
|
|
color red start="^\s*/\*" end="\*/"
|
|
|
|
## Trailing whitespace
|
|
color ,red "[[:space:]]+$"
|
|
|
|
# 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}"
|