Path: blob/main/src/vs/editor/browser/widget/diffEditor/registrations.contribution.ts
3296 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45import { Codicon } from '../../../../base/common/codicons.js';6import { ThemeIcon } from '../../../../base/common/themables.js';7import { ModelDecorationOptions } from '../../../common/model/textModel.js';8import { localize } from '../../../../nls.js';9import { registerColor } from '../../../../platform/theme/common/colorRegistry.js';10import { registerIcon } from '../../../../platform/theme/common/iconRegistry.js';1112export const diffMoveBorder = registerColor(13'diffEditor.move.border',14'#8b8b8b9c',15localize('diffEditor.move.border', 'The border color for text that got moved in the diff editor.')16);1718export const diffMoveBorderActive = registerColor(19'diffEditor.moveActive.border',20'#FFA500',21localize('diffEditor.moveActive.border', 'The active border color for text that got moved in the diff editor.')22);2324export const diffEditorUnchangedRegionShadow = registerColor(25'diffEditor.unchangedRegionShadow',26{ dark: '#000000', light: '#737373BF', hcDark: '#000000', hcLight: '#737373BF', },27localize('diffEditor.unchangedRegionShadow', 'The color of the shadow around unchanged region widgets.')28);2930export const diffInsertIcon = registerIcon('diff-insert', Codicon.add, localize('diffInsertIcon', 'Line decoration for inserts in the diff editor.'));31export const diffRemoveIcon = registerIcon('diff-remove', Codicon.remove, localize('diffRemoveIcon', 'Line decoration for removals in the diff editor.'));3233export const diffLineAddDecorationBackgroundWithIndicator = ModelDecorationOptions.register({34className: 'line-insert',35description: 'line-insert',36isWholeLine: true,37linesDecorationsClassName: 'insert-sign ' + ThemeIcon.asClassName(diffInsertIcon),38marginClassName: 'gutter-insert',39});4041export const diffLineDeleteDecorationBackgroundWithIndicator = ModelDecorationOptions.register({42className: 'line-delete',43description: 'line-delete',44isWholeLine: true,45linesDecorationsClassName: 'delete-sign ' + ThemeIcon.asClassName(diffRemoveIcon),46marginClassName: 'gutter-delete',47});4849export const diffLineAddDecorationBackground = ModelDecorationOptions.register({50className: 'line-insert',51description: 'line-insert',52isWholeLine: true,53marginClassName: 'gutter-insert',54});5556export const diffLineDeleteDecorationBackground = ModelDecorationOptions.register({57className: 'line-delete',58description: 'line-delete',59isWholeLine: true,60marginClassName: 'gutter-delete',61});6263export const diffAddDecoration = ModelDecorationOptions.register({64className: 'char-insert',65description: 'char-insert',66shouldFillLineOnLineBreak: true,67});6869export const diffWholeLineAddDecoration = ModelDecorationOptions.register({70className: 'char-insert',71description: 'char-insert',72isWholeLine: true,73});7475export const diffAddDecorationEmpty = ModelDecorationOptions.register({76className: 'char-insert diff-range-empty',77description: 'char-insert diff-range-empty',78});7980export const diffDeleteDecoration = ModelDecorationOptions.register({81className: 'char-delete',82description: 'char-delete',83shouldFillLineOnLineBreak: true,84});8586export const diffWholeLineDeleteDecoration = ModelDecorationOptions.register({87className: 'char-delete',88description: 'char-delete',89isWholeLine: true,90});9192export const diffDeleteDecorationEmpty = ModelDecorationOptions.register({93className: 'char-delete diff-range-empty',94description: 'char-delete diff-range-empty',95});969798