Created
October 8, 2014 13:44
-
-
Save chriseidhof/18dbc1c4eef919eab2c7 to your computer and use it in GitHub Desktop.
Listings Swift config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\lstdefinelanguage{swift} | |
{ | |
morekeywords={ | |
func,if,then,else,for,in,while,do,switch,case,default,where,break,continue,fallthrough,return, | |
typealias,struct,class,enum,protocol,var,func,let,get,set,willSet,didSet,inout,init,deinit,extension, | |
subscript,prefix,operator,infix,postfix,precedence,associativity,left,right,none,convenience,dynamic, | |
final,lazy,mutating,nonmutating,optional,override,required,static,unowned,safe,weak,internal, | |
private,public,is,as,self,unsafe,dynamicType,true,false,nil,Type,Protocol, | |
}, | |
morecomment=[l]{//}, % l is for line comment | |
morecomment=[s]{/*}{*/}, % s is for start and end delimiter | |
morestring=[b]" % defines that strings are enclosed in double quotes | |
} | |
\definecolor{keyword}{HTML}{BA2CA3} | |
\definecolor{string}{HTML}{D12F1B} | |
\definecolor{comment}{HTML}{008400} | |
\lstset{ | |
language=swift, | |
basicstyle=\ttfamily, | |
showstringspaces=false, % lets spaces in strings appear as real spaces | |
columns=fixed, | |
keepspaces=true, | |
keywordstyle=\color{keyword}, | |
stringstyle=\color{string}, | |
commentstyle=\color{comment}, | |
} |
"Test message: \(message)" why is the variable also the string color can someone help me pls
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think you're a few keywords short:
try
,catch
,guard