1
0
mirror of https://github.com/scopatz/nanorc synced 2024-11-22 08:35:39 +01:00

- added Standard Libraries

- fixed and improved some Standard Types
- made ! more visible
This commit is contained in:
Philipp Leo Dylong 2016-04-29 21:21:21 +02:00
parent e7974027ca
commit 5536991f40

View File

@ -1,5 +1,5 @@
############################################################################## ##############################################################################
# Swift syntax highlighting for Nano. # Swift syntax highlighting for Nano. v.1.04
############################################################################## ##############################################################################
syntax "Swift" "\.swift$" syntax "Swift" "\.swift$"
@ -9,27 +9,37 @@ color white ".+"
# Operators # Operators
color yellow "[.:;,+*|=!?\%]" "<" ">" "/" "-" "&" color yellow "[.:;,+*|=!?\%]" "<" ">" "/" "-" "&"
color brightyellow "[!]"
# Statements # 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 "\b(class|import|let|var|struct|enum|func|if|else|switch|case|default|for|in|internal|external|unowned|private|public|throws)\b"
color magenta "(prefix|postfix|operator|extension|lazy|get|set|self|willSet|didSet|override|super|convenience|weak|strong|mutating|return|guard)\ " color magenta "\b(prefix|postfix|operator|extension|lazy|get|set|self|willSet|didSet|override|super|convenience|weak|strong|mutating|return|guard)\b"
# Keywords # Keywords
color cyan "(print)" color cyan "\b(print)\b"
color magenta "(init)" color magenta "\b(init)\b"
# Numbers # Numbers
color blue "([0-9]+)" color blue "\b([0-9]+)\b"
# Standard Types # Standard Types
color brightmagenta "\ ((U)?Int(8|16|32|64))" color brightmagenta "\b((U)?Int(8|16|32|64))\b"
color brightmagenta "(true|false|nil)" color brightmagenta "\b(true|false|nil)\b"
color brightmagenta "\ (Double|String|Float|Boolean|Dictionary|Array|Int)" color brightmagenta "\b(Double|String|Float|Bool|Dictionary|Array|Int|UInt|Character|Range|Set|UnicodeScalar|Bit|RawByte|Slice|UnsafePointer|UnsafeMutablePointer)\b"
color magenta "\ (AnyObject)" color magenta "\b(AnyObject)\b"
# Standard Type Aliases and Protocols
color magenta "\b(AnyObject|AnyClass|GeneratorType|AnyGenerator|Element|Optional|Mirror|UnicodeScalarType|IntMax|UIntMax|Void|Any|Comparable|Equatable|Hashable|SequenceType)\b"
# Standard Libraries
color cyan "\b(Foundation|Glibc|Darwin|XCTest|)\b"
# Text # Text
color red ""[^"]*"" color red ""[^"]*""
# Variable in Text
color white start="\\\(" end="\)"
# Comments # Comments
color green "//.*" color green "//.*"
color brightgreen "///.*" color brightgreen "///.*"