@bithero/darkplus-monaco

2.0.3 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i @bithero/darkplus-monaco

Weekly Downloads

4

Version

2.0.3

License

AGPL-3.0-or-later

Unpacked Size

58.2 kB

Total Files

11

Last publish

Collaborators

  • mai-lapyst