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.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/app/assets/javascripts/ide/lib/editor.js b/app/assets/javascripts/ide/lib/editor.js
index 493dedcd89a..4fad0c09ce7 100644
--- a/app/assets/javascripts/ide/lib/editor.js
+++ b/app/assets/javascripts/ide/lib/editor.js
@@ -12,7 +12,7 @@ import { clearDomElement } from '~/editor/utils';
import { registerLanguages } from '../utils';
function setupThemes() {
- themes.forEach(theme => {
+ themes.forEach((theme) => {
monacoEditor.defineTheme(theme.name, theme.data);
});
}
@@ -108,7 +108,7 @@ export default class Editor {
this.instance.updateOptions(
editorOptions.reduce((acc, obj) => {
- Object.keys(obj).forEach(key => {
+ Object.keys(obj).forEach((key) => {
Object.assign(acc, {
[key]: obj[key](model),
});
@@ -177,7 +177,7 @@ export default class Editor {
onPositionChange(cb) {
if (!this.instance.onDidChangeCursorPosition) return;
- this.disposable.add(this.instance.onDidChangeCursorPosition(e => cb(this.instance, e)));
+ this.disposable.add(this.instance.onDidChangeCursorPosition((e) => cb(this.instance, e)));
}
updateDiffView() {
@@ -213,14 +213,14 @@ export default class Editor {
addCommands() {
const { store } = this;
- const getKeyCode = key => {
+ const getKeyCode = (key) => {
const monacoKeyMod = key.indexOf('KEY_') === 0;
return monacoKeyMod ? KeyCode[key] : KeyMod[key];
};
- keymap.forEach(command => {
- const keybindings = command.bindings.map(binding => {
+ keymap.forEach((command) => {
+ const keybindings = command.bindings.map((binding) => {
const keys = binding.split('+');
// eslint-disable-next-line no-bitwise