Path: blob/main/src/vs/editor/common/config/editorConfiguration.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 { Event } from '../../../base/common/event.js';6import { IDisposable } from '../../../base/common/lifecycle.js';7import { ConfigurationChangedEvent, IComputedEditorOptions, IEditorOptions } from './editorOptions.js';8import { IDimension } from '../core/2d/dimension.js';9import { MenuId } from '../../../platform/actions/common/actions.js';1011export interface IEditorConfiguration extends IDisposable {12/**13* Is this a simple widget (not a real code editor)?14*/15readonly isSimpleWidget: boolean;16/**17* The context menu id for the editor.18*/19readonly contextMenuId: MenuId;20/**21* Computed editor options.22*/23readonly options: IComputedEditorOptions;24/**25* The `options` have changed (quick event)26*/27onDidChangeFast: Event<ConfigurationChangedEvent>;28/**29* The `options` have changed (slow event)30*/31onDidChange: Event<ConfigurationChangedEvent>;32/**33* Get the raw options as they were passed in to the editor34* and merged with all calls to `updateOptions`.35*/36getRawOptions(): IEditorOptions;37/**38* Update the options with new partial options. All previous39* options will be kept and only present keys will be overwritten.40*/41updateOptions(newOptions: Readonly<IEditorOptions>): void;42/**43* Recompute options with new reference element dimensions.44*/45observeContainer(dimension?: IDimension): void;46/**47* Set if the current model is dominated by long lines.48*/49setIsDominatedByLongLines(isDominatedByLongLines: boolean): void;50/**51* Set the current model line count.52*/53setModelLineCount(modelLineCount: number): void;54/**55* Set the current view model line count.56*/57setViewLineCount(viewLineCount: number): void;58/**59* Set reserved height above.60*/61setReservedHeight(reservedHeight: number): void;62/**63* Set the number of decoration lanes to be rendered in the glyph margin.64*/65setGlyphMarginDecorationLaneCount(decorationLaneCount: number): void;66}676869