How to add custom syntax to st.code?

Is it possible?

Streamlit uses react-syntax-highlighter. The full list of supported languages is here: react-syntax-highlighter/AVAILABLE_LANGUAGES_PRISM.MD at master · react-syntax-highlighter/react-syntax-highlighter · GitHub

Although I haven’t tried it, I suspect you could introduce a custom language by modifying that library.

1 Like