-
-
Save kprofic/ad27cd883b42fcc910c8 to your computer and use it in GitHub Desktop.
This file contains hidden or 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}, | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment