Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/ide/lib/editor.js')
-rw-r--r--app/assets/javascripts/ide/lib/editor.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/assets/javascripts/ide/lib/editor.js b/app/assets/javascripts/ide/lib/editor.js
index 4dfc27117c0..6e90968f008 100644
--- a/app/assets/javascripts/ide/lib/editor.js
+++ b/app/assets/javascripts/ide/lib/editor.js
@@ -8,9 +8,10 @@ import ModelManager from './common/model_manager';
import { editorOptions, defaultEditorOptions, defaultDiffEditorOptions } from './editor_options';
import { themes } from './themes';
import languages from './languages';
+import schemas from './schemas';
import keymap from './keymap.json';
import { clearDomElement } from '~/editor/utils';
-import { registerLanguages } from '../utils';
+import { registerLanguages, registerSchemas } from '../utils';
function setupThemes() {
themes.forEach(theme => {
@@ -45,6 +46,10 @@ export default class Editor {
setupThemes();
registerLanguages(...languages);
+ if (gon.features?.schemaLinting) {
+ registerSchemas(...schemas);
+ }
+
this.debouncedUpdate = debounce(() => {
this.updateDimensions();
}, 200);