deathau / cm-editor-syntax-highlight-obsidian

A plugin for [Obsidian](https://obsidian.md) which allows syntax highlighting for code blocks in the editor.
463 stars 37 forks source link

Adjusting global theme #59

Open SophieBosio opened 1 year ago

SophieBosio commented 1 year ago

Is there any way to change the base/global theme for named languages?

I'm able to adjust the colours for the theme that affects the highlighting of my YAML frontmatter by changing the colours in /.obsidian/plugins/cm-editor-syntax-highlight-obsidian/styles.css.

However, changing it doesn't seem to affect the theme used to highlight specific languages. So if I just type in a code block, there's no highlighting and if I specify e.g., python, it uses some other theme but not the one I adjusted in styles.css.

Is there anyway I can specify to use my custom theme in these language-specific code blocks? Thanks so much, I'm really grateful for this plugin!

evilcomrade commented 1 year ago

Id also love to know how to change this, would love to be able to use a monokai theme for my code blocks. I see codemirror even has the theme styles there, just not sure how to integrate them with this plugin.

tortoo commented 1 week ago

I have tested it several times and it seems that the plug-in has failed. No matter how I modify the styles.css file, it doesn't work. What should work is the code highlighting that comes with Obsidian, but the one that comes with it is too simple and the customizable parts are too limited. There are many things that can be modified in this plug-in, but unfortunately it cannot take effect.