summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/ide/lib/editor.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/ide/lib/editor.js')
-rw-r--r--app/assets/javascripts/ide/lib/editor.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/app/assets/javascripts/ide/lib/editor.js b/app/assets/javascripts/ide/lib/editor.js
index a0f689065aa..3d729463cb4 100644
--- a/app/assets/javascripts/ide/lib/editor.js
+++ b/app/assets/javascripts/ide/lib/editor.js
@@ -6,13 +6,14 @@ import DirtyDiffController from './diff/controller';
import Disposable from './common/disposable';
import ModelManager from './common/model_manager';
import editorOptions, { defaultEditorOptions } from './editor_options';
-import gitlabTheme from './themes/gl_theme';
+import { themes } from './themes';
import keymap from './keymap.json';
import { clearDomElement } from '~/editor/utils';
-function setupMonacoTheme() {
- monacoEditor.defineTheme(gitlabTheme.themeName, gitlabTheme.monacoTheme);
- monacoEditor.setTheme('gitlab');
+function setupThemes() {
+ themes.forEach(theme => {
+ monacoEditor.defineTheme(theme.name, theme.data);
+ });
}
export default class Editor {
@@ -35,7 +36,7 @@ export default class Editor {
...options,
};
- setupMonacoTheme();
+ setupThemes();
this.debouncedUpdate = _.debounce(() => {
this.updateDimensions();