You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Theme: Allow theme plugin to define monacoOptions in themes with variations #5771
I hope it's not too late for this feature request.
#5659 introduced the mechanism for themes to provide multiple variants. Unfortunately, it has some limitations:
When the editor manages the scheme, Monaco swaps vs/vs-dark and Mermaid swaps default/dark — per-scheme overrides aren't part of this API. The plugin's monacoOptions / mermaid keys still load once but don't switch with the scheme. A richer per-scheme block (variants) is the natural follow-up if needed.
@bonanitech can you provide a more concrete example of what you're asking here? Do you have a proposal for how a theme plugin could provide options per scheme and whether its even possible to switch these things at runtime? The more I have to investigate myself, the less likely any of this will get into v5.
Activity
knolleary commentedon May 29, 2026
@bonanitech can you provide a more concrete example of what you're asking here? Do you have a proposal for how a theme plugin could provide options per scheme and whether its even possible to switch these things at runtime? The more I have to investigate myself, the less likely any of this will get into v5.
bonanitech commentedon May 29, 2026
Currently, we use this for themes without variations:
Maybe we could have something like this for themes with variations:
monaco.editor.setTheme()seems to do the trick.monaco.editor.setTheme('vs-dark')sets the theme to 'vs-dark',monaco.editor.setTheme('vs')sets to 'vs', and so on...