Closed devlato closed 4 months ago
Thanks.
Unfortunately there isn't a good way to use CodeMirror's themes. The add-on only uses the CodeMirror parser and then has to map the recognized styles to Google docs.
It currently does this in a hardcoded way: https://github.com/floitsch/syntax-addon/blob/master/theme/theme.ts#L159
The background colors are also hardcoded here: https://github.com/floitsch/syntax-addon/blob/master/theme/theme.ts#L100
Adding theme-support would therefore consist of two steps:
Theme support has been committed and should (hopefully) be live soon.
The documentation is already published: https://code-syntax-addon.github.io/code-syntax/themes.html
Hi @floitsch!
Firstly, thanks a lot for building this amazing plugin! It's such a delight.
Just wanted to ask you if you would consider adding theme support? From the
README
, I can conclude that it's built on top of CodeMirror, which does support quite a few syntax highlighting themes – do you think it would be possible to support switching themes?