How to set custom colors for the code editor #7458
Unanswered
nms-scribe
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm playing around with code I copied straight out of the code editor demo, and I want to add some custom colors. I couldn't find any documentation, so I'm going through the code itself to guess. Just to see if I can do it, I'm creating a custom SyntectSettings value, like this:
I've got as far as changing the layouter code from the original:
To this:
But now, I can't figure out how to use that new theme. The
&theme
argument is a CodeTheme, but with thesyntect
feature on, the only thing I can set on that struct is a dark mode boolean, and asyntect_theme
enum which doesn't include an option to set it by name.So, does anybody know how do I use a custom color theme for syntect syntax highlighting?
Beta Was this translation helpful? Give feedback.
All reactions