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,
|
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
|
|
|
},
|
|
|
|
];
|