debian-mirror-gitlab/app/assets/javascripts/ide/lib/editor_options.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

41 lines
849 B
JavaScript
Raw Normal View History

2018-05-09 12:01:36 +05:30
export const defaultEditorOptions = {
model: null,
readOnly: false,
contextmenu: true,
scrollBeyondLastLine: false,
minimap: {
enabled: false,
},
wordWrap: 'on',
2021-04-29 21:17:54 +05:30
glyphMargin: true,
2022-07-23 23:45:48 +05:30
automaticLayout: true,
2018-05-09 12:01:36 +05:30
};
2020-06-23 00:09:42 +05:30
export const defaultDiffOptions = {
ignoreWhitespace: false,
};
export const defaultDiffEditorOptions = {
...defaultEditorOptions,
quickSuggestions: false,
occurrencesHighlight: false,
ignoreTrimWhitespace: false,
readOnly: false,
renderLineHighlight: 'none',
hideCursorInOverviewRuler: true,
2021-04-29 21:17:54 +05:30
glyphMargin: true,
2020-06-23 00:09:42 +05:30
};
export const defaultModelOptions = {
endOfLine: 0,
insertFinalNewline: true,
trimTrailingWhitespace: false,
};
export const editorOptions = [
2018-05-09 12:01:36 +05:30
{
2021-03-08 18:12:59 +05:30
readOnly: (model) => Boolean(model.file.file_lock),
quickSuggestions: (model) => !(model.language === 'markdown'),
2018-05-09 12:01:36 +05:30
},
];