Merge pull request #95 from creekpld/master

Swift
This commit is contained in:
Anthony Scopatz 2016-03-07 16:42:17 -05:00
commit e1f1ad336c
2 changed files with 41 additions and 0 deletions

1
nanorc
View File

@ -64,6 +64,7 @@ include "~/.nano/sed.nanorc"
include "~/.nano/sh.nanorc" include "~/.nano/sh.nanorc"
include "~/.nano/sls.nanorc" include "~/.nano/sls.nanorc"
include "~/.nano/sql.nanorc" include "~/.nano/sql.nanorc"
include "~/.nano/swift.nanorc"
include "~/.nano/systemd.nanorc" include "~/.nano/systemd.nanorc"
include "~/.nano/tcl.nanorc" include "~/.nano/tcl.nanorc"
include "~/.nano/tex.nanorc" include "~/.nano/tex.nanorc"

40
swift.nanorc Normal file
View File

@ -0,0 +1,40 @@
##############################################################################
# Swift syntax highlighting for Nano.
##############################################################################
syntax "Swift" "\.swift$"
# Default
color white ".+"
# Operators
color yellow "[.:;,+*|=!?\%]" "<" ">" "/" "-" "&"
# Statements
color magenta "(class|import|let|var|struct|enum|func|if|else|switch|case|default|for|in|internal|external|unowned|private|public|throws)\ "
color magenta "(prefix|postfix|operator|extension|lazy|get|set|self|willSet|didSet|override|super|convenience|weak|strong|mutating|return|guard)\ "
# Keywords
color cyan "(print)"
color magenta "(init)"
# Numbers
color blue "([0-9]+)"
# Standard Types
color brightmagenta "\ ((U)?Int(8|16|32|64))"
color brightmagenta "(true|false|nil)"
color brightmagenta "\ (Double|String|Float|Boolean|Dictionary|Array|Int)"
color magenta "\ (AnyObject)"
# Text
color red ""[^"]*""
# Comments
color green "//.*"
color brightgreen "///.*"
color green start="/\*\*" end="\*/"
color green "[/**]"
# Trailing whitespace
color ,green "[[:space:]]+$"