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

38 lines
782 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',
};
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,
};
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
},
];