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

editor_options.js « lib « ide « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 52da9942efefd399ec392e55e5b40d9e97c59a1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
export const defaultEditorOptions = {
  model: null,
  readOnly: false,
  contextmenu: true,
  scrollBeyondLastLine: false,
  minimap: {
    enabled: false,
  },
  wordWrap: 'on',
  glyphMargin: true,
};

export const defaultDiffOptions = {
  ignoreWhitespace: false,
};

export const defaultDiffEditorOptions = {
  ...defaultEditorOptions,
  quickSuggestions: false,
  occurrencesHighlight: false,
  ignoreTrimWhitespace: false,
  readOnly: false,
  renderLineHighlight: 'none',
  hideCursorInOverviewRuler: true,
  glyphMargin: true,
};

export const defaultModelOptions = {
  endOfLine: 0,
  insertFinalNewline: true,
  trimTrailingWhitespace: false,
};

export const editorOptions = [
  {
    readOnly: (model) => Boolean(model.file.file_lock),
    quickSuggestions: (model) => !(model.language === 'markdown'),
  },
];