Skip to content

How to make sure a theme is defined for token provider #488

Answered by kaisalmen
camargo asked this question in Q&A
Discussion options

You must be logged in to vote

@camargo if you want to use monarch you cannot use the services supplied by monaco-vscode-api.
But, thanks to @CGNonofr you can just use the java default extension(s) from vscode that are now exposed by monaco-vscode-api.

At the top import the following:

import 'vscode/default-extensions/theme-defaults';
import 'vscode/default-extensions/java';

And add enableLanguagesService to initServices:

await initServices({
	enableThemeService: true,
	enableModelEditorService: true,
	modelEditorServiceConfig: {
		useDefaultFunction: true
	},
	enableLanguagesService: true,
	debugLogging: true
});

For java you don't not need to use any further code/supply configuration.

We do the same thing "by hand" f…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@kaisalmen
Comment options

Answer selected by camargo
@camargo
Comment options

@umiiw2010
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants