St.code syntax highlighting types

I’ve been using st.code for a while now and I’ve been trying to highlight C++ and C# code but I couldn’t find anywhere that tells you the languages that st.code supports. Could anyone tell me what languages the syntax highlighting supports and their keynames?

Hi @Bob_Chesterton, welcome to the Streamlit community! :wave: :partying_face:

That’s a really good question! st.code uses the react-syntax-highlighter NPM package for syntax highlighting. The list of available languages are available here (includes C but does not support C++ or C#):

A PR with a fix to the st.code docs is on its way:

1 Like