Mai Lapyst 6bdccfe787 | ||
---|---|---|
build | ||
src | ||
test | ||
.gitignore | ||
LICENSE | ||
package.json | ||
readme.md | ||
yarn.lock |
readme.md
darkplus monaco
A port of vscode's dark+ theme to work with a plain monaco
License
AGPL-3.0-or-later; see LICENSE
file for more details.
Usage
Simply import it:
import '@bithero/darkplus-monaco';
browsers
Inside browsers the usage is slightly different:
For AMD builds (min
/dev
):
require.config({
paths: {
vs: '...', // configure the vs path like always
bithero: '...' // set to the web-path where the darkplus-monaco.js file lies in
}
});
require(['vs/editor/editor.main'], function() {
// require it async; literally any other way will fail!
require(['bithero/darkplus-monaco'], function() {
// only set the theme after it is fully loaded
monaco.editor.setTheme('darkplus');
});
// you can also setup a monaco instance via monaco.editor.create here, but setting the theme via
// the theme property in the options will not work.
// If you want it safer, do it inside the callback of the glsl require...
});