CodinGame / monaco-vscode-api

VSCode public API plugged on the monaco editor
MIT License
214 stars 29 forks source link

Problem with custom theme declaration #458

Closed SinnerAir closed 2 weeks ago

SinnerAir commented 3 weeks ago

it is impossible to specify your theme through the method monaco.editor.defineTheme.

Version packages:

Despite the fact that when moving a call various errors appear:

if before initialization: Uncaught Error: Services are already initialized if after initialization: monaco-editor.js?v=27546643:2315 Uncaught TypeError: standaloneThemeService.defineTheme is not a function

Live demo: https://stackblitz.com/edit/stackblitz-starters-xqgvjd?file=script.js

CGNonofr commented 3 weeks ago

Indeed, monaco.editor.defineTheme can only be used to define monaco/monarch themes.

As soon as you use the theme service override, you are expected to use a VSCode extension to declare it.

SinnerAir commented 3 weeks ago

Thank you. I will try.

SinnerAir commented 2 weeks ago

Happened! Thank you