A port of vscode's dark+ theme to work with a plain monaco
Go to file
Mai Lapyst 6bdccfe787
Update v2.0.3
2024-03-17 10:03:28 +01:00
build Update v2.0.0 2023-09-18 04:58:01 +02:00
src Add variable.language from vscode's vs-dark theme 2024-03-17 10:01:00 +01:00
test Update v2.0.0 2023-09-18 04:58:01 +02:00
.gitignore Update v2.0.0 2023-09-18 04:58:01 +02:00
LICENSE Initial commit 2022-10-06 19:53:42 +02:00
package.json Update v2.0.3 2024-03-17 10:03:28 +01:00
readme.md Update readme 2024-03-17 10:03:19 +01:00
yarn.lock Update v2.0.0 2023-09-18 04:58:01 +02:00

readme.md

darkplus monaco

Npm package version Npm package version

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...
});