I'm adding Go code to my document via 'Insert->Program Listing' in Lyx. The language Go is not available in the language dropdown in the settings. Is there an easy way to add Go syntax highlighting/parsing to Lyx?
[Tex/LaTex] How to add Go to the programming languages list in Lyx
lyx
Best Answer
You can get the
lstlang0.sty
file fromhere(leads to a dead link, copy available here). You need to copy it into thelistings
directory (something like /usr/local/share/texmf/tex/latex/listings) and use it like this:Of course in lyx you want insert program listing and right click and select settings to set the language however, this does not work as the language list seems to be fixed. So it's better just
insert tex code
and use the code above.