Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vs/editor/common/config/editorConfiguration.ts
3296 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
import { Event } from '../../../base/common/event.js';
7
import { IDisposable } from '../../../base/common/lifecycle.js';
8
import { ConfigurationChangedEvent, IComputedEditorOptions, IEditorOptions } from './editorOptions.js';
9
import { IDimension } from '../core/2d/dimension.js';
10
import { MenuId } from '../../../platform/actions/common/actions.js';
11
12
export interface IEditorConfiguration extends IDisposable {
13
/**
14
* Is this a simple widget (not a real code editor)?
15
*/
16
readonly isSimpleWidget: boolean;
17
/**
18
* The context menu id for the editor.
19
*/
20
readonly contextMenuId: MenuId;
21
/**
22
* Computed editor options.
23
*/
24
readonly options: IComputedEditorOptions;
25
/**
26
* The `options` have changed (quick event)
27
*/
28
onDidChangeFast: Event<ConfigurationChangedEvent>;
29
/**
30
* The `options` have changed (slow event)
31
*/
32
onDidChange: Event<ConfigurationChangedEvent>;
33
/**
34
* Get the raw options as they were passed in to the editor
35
* and merged with all calls to `updateOptions`.
36
*/
37
getRawOptions(): IEditorOptions;
38
/**
39
* Update the options with new partial options. All previous
40
* options will be kept and only present keys will be overwritten.
41
*/
42
updateOptions(newOptions: Readonly<IEditorOptions>): void;
43
/**
44
* Recompute options with new reference element dimensions.
45
*/
46
observeContainer(dimension?: IDimension): void;
47
/**
48
* Set if the current model is dominated by long lines.
49
*/
50
setIsDominatedByLongLines(isDominatedByLongLines: boolean): void;
51
/**
52
* Set the current model line count.
53
*/
54
setModelLineCount(modelLineCount: number): void;
55
/**
56
* Set the current view model line count.
57
*/
58
setViewLineCount(viewLineCount: number): void;
59
/**
60
* Set reserved height above.
61
*/
62
setReservedHeight(reservedHeight: number): void;
63
/**
64
* Set the number of decoration lanes to be rendered in the glyph margin.
65
*/
66
setGlyphMarginDecorationLaneCount(decorationLaneCount: number): void;
67
}
68
69