mirror of
https://github.com/scopatz/nanorc
synced 2024-11-22 08:35:39 +01:00
Added files via upload
This commit is contained in:
parent
8b06671abd
commit
1e14b00006
40
swift.nanorc
Normal file
40
swift.nanorc
Normal 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:]]+$"
|
Loading…
Reference in New Issue
Block a user