-
-
Save Geruhn/3d21f60a869457373d84 to your computer and use it in GitHub Desktop.
To answer this tex.se question: http://tex.stackexchange.com/questions/89574/language-option-supported-in-listings
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
\usepackage{listings} | |
\usepackage{color} | |
\definecolor{lightgray}{rgb}{.9,.9,.9} | |
\definecolor{darkgray}{rgb}{.4,.4,.4} | |
\definecolor{purple}{rgb}{0.65, 0.12, 0.82} | |
\lstdefinelanguage{JavaScript}{ | |
keywords={break, case, catch, continue, debugger, default, delete, do, else, false, finally, for, function, if, in, instanceof, new, null, return, switch, this, throw, true, try, typeof, var, void, while, with}, | |
morecomment=[l]{//}, | |
morecomment=[s]{/*}{*/}, | |
morestring=[b]', | |
morestring=[b]", | |
ndkeywords={class, export, boolean, throw, implements, import, this}, | |
keywordstyle=\color{blue}\bfseries, | |
ndkeywordstyle=\color{darkgray}\bfseries, | |
identifierstyle=\color{black}, | |
commentstyle=\color{purple}\ttfamily, | |
stringstyle=\color{red}\ttfamily, | |
sensitive=true | |
} | |
\lstset{ | |
language=JavaScript, | |
backgroundcolor=\color{lightgray}, | |
extendedchars=true, | |
basicstyle=\footnotesize\ttfamily, | |
showstringspaces=false, | |
showspaces=false, | |
numbers=left, | |
numberstyle=\footnotesize, | |
numbersep=9pt, | |
tabsize=2, | |
breaklines=true, | |
showtabs=false, | |
captionpos=b | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
More up to date keyword list for ES6: