Skip to content

Commit 6b49d15

Browse files
committed
1 parent 07aacd2 commit 6b49d15

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

src/vs/editor/common/config/diffEditor.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import { ValidDiffEditorBaseOptions } from 'vs/editor/common/config/editorOptions';
77

8-
export const diffEditorDefaultOptions: ValidDiffEditorBaseOptions = {
8+
export const diffEditorDefaultOptions = {
99
enableSplitViewResizing: true,
1010
splitViewDefaultRatio: 0.5,
1111
renderSideBySide: true,
@@ -34,4 +34,4 @@ export const diffEditorDefaultOptions: ValidDiffEditorBaseOptions = {
3434
onlyShowAccessibleDiffViewer: false,
3535
renderSideBySideInlineBreakpoint: 900,
3636
useInlineViewWhenSpaceIsLimited: true,
37-
};
37+
} satisfies ValidDiffEditorBaseOptions;

src/vs/editor/common/config/editorConfigurationSchema.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -151,53 +151,53 @@ const editorConfiguration: IConfigurationNode = {
151151
},
152152
'diffEditor.maxComputationTime': {
153153
type: 'number',
154-
default: 5000,
154+
default: diffEditorDefaultOptions.maxComputationTime,
155155
description: nls.localize('maxComputationTime', "Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")
156156
},
157157
'diffEditor.maxFileSize': {
158158
type: 'number',
159-
default: 50,
159+
default: diffEditorDefaultOptions.maxFileSize,
160160
description: nls.localize('maxFileSize', "Maximum file size in MB for which to compute diffs. Use 0 for no limit.")
161161
},
162162
'diffEditor.renderSideBySide': {
163163
type: 'boolean',
164-
default: true,
164+
default: diffEditorDefaultOptions.renderSideBySide,
165165
description: nls.localize('sideBySide', "Controls whether the diff editor shows the diff side by side or inline.")
166166
},
167167
'diffEditor.renderSideBySideInlineBreakpoint': {
168168
type: 'number',
169-
default: true,
169+
default: diffEditorDefaultOptions.renderSideBySideInlineBreakpoint,
170170
description: nls.localize('renderSideBySideInlineBreakpoint', "If the diff editor width is smaller than this value, the inline view is used.")
171171
},
172172
'diffEditor.useInlineViewWhenSpaceIsLimited': {
173173
type: 'boolean',
174-
default: true,
174+
default: diffEditorDefaultOptions.useInlineViewWhenSpaceIsLimited,
175175
description: nls.localize('useInlineViewWhenSpaceIsLimited', "If enabled and the editor width is too small, the inline view is used.")
176176
},
177177
'diffEditor.renderMarginRevertIcon': {
178178
type: 'boolean',
179-
default: true,
179+
default: diffEditorDefaultOptions.renderMarginRevertIcon,
180180
description: nls.localize('renderMarginRevertIcon', "When enabled, the diff editor shows arrows in its glyph margin to revert changes.")
181181
},
182182
'diffEditor.ignoreTrimWhitespace': {
183183
type: 'boolean',
184-
default: true,
184+
default: diffEditorDefaultOptions.ignoreTrimWhitespace,
185185
description: nls.localize('ignoreTrimWhitespace', "When enabled, the diff editor ignores changes in leading or trailing whitespace.")
186186
},
187187
'diffEditor.renderIndicators': {
188188
type: 'boolean',
189-
default: true,
189+
default: diffEditorDefaultOptions.renderIndicators,
190190
description: nls.localize('renderIndicators', "Controls whether the diff editor shows +/- indicators for added/removed changes.")
191191
},
192192
'diffEditor.codeLens': {
193193
type: 'boolean',
194-
default: false,
194+
default: diffEditorDefaultOptions.diffCodeLens,
195195
description: nls.localize('codeLens', "Controls whether the editor shows CodeLens.")
196196
},
197197
'diffEditor.wordWrap': {
198198
type: 'string',
199199
enum: ['off', 'on', 'inherit'],
200-
default: 'inherit',
200+
default: diffEditorDefaultOptions.diffWordWrap,
201201
markdownEnumDescriptions: [
202202
nls.localize('wordWrap.off', "Lines will never wrap."),
203203
nls.localize('wordWrap.on', "Lines will wrap at the viewport width."),
@@ -239,7 +239,7 @@ const editorConfiguration: IConfigurationNode = {
239239
},
240240
'diffEditor.experimental.showMoves': {
241241
type: 'boolean',
242-
default: false,
242+
default: diffEditorDefaultOptions.experimental.showMoves,
243243
markdownDescription: nls.localize('showMoves', "Controls whether the diff editor should show detected code moves. Only works when {0} is set.", '`#diffEditor.experimental.useVersion2#`')
244244
},
245245
'diffEditor.experimental.useVersion2': {
@@ -250,7 +250,7 @@ const editorConfiguration: IConfigurationNode = {
250250
},
251251
'diffEditor.experimental.showEmptyDecorations': {
252252
type: 'boolean',
253-
default: true,
253+
default: diffEditorDefaultOptions.experimental.showEmptyDecorations,
254254
description: nls.localize('showEmptyDecorations', "Controls whether the diff editor shows empty decorations to see where characters got inserted or deleted."),
255255
}
256256
}

0 commit comments

Comments
 (0)