UNPKG

10.8 kBTypeScriptView Raw
1import { FileEncoding, Invisibles } from '../index';
2
3// NOTE: the config schema with these defaults can be found here:
4// https://github.com/atom/atom/blob/v1.40.0/src/config-schema.js
5/**
6 * Allows you to strongly type Atom configuration variables. Additional key:value
7 * pairings merged into this interface will result in configuration values under
8 * the value of each key being templated by the type of the associated value.
9 */
10// tslint:disable-next-line:no-empty-interface
11export interface ConfigValues {
12 // NOTE: this is intentionally left empty, extended via ambient declarations
13}
14
15// NOTE: A hack to make ConfigValues extensible
16// tslint:disable-next-line:no-declare-current-package
17declare module 'atom' {
18 interface ConfigValues {
19 /**
20 * List of glob patterns. Files and directories matching these patterns will be
21 * ignored by some packages, such as the fuzzy finder and tree view. Individual
22 * packages might have additional config settings for ignoring names.
23 */
24 'core.ignoredNames': string[];
25
26 /**
27 * Files and directories ignored by the current project's VCS system will be ignored
28 * by some packages, such as the fuzzy finder and find and replace. For example,
29 * projects using Git have these paths defined in the .gitignore file. Individual
30 * packages might have additional config settings for ignoring VCS ignored files and
31 * folders.
32 */
33 'core.excludeVcsIgnoredPaths': boolean;
34
35 /**
36 * Follow symbolic links when searching files and when opening files with the fuzzy
37 * finder.
38 */
39 'core.followSymlinks': boolean;
40
41 /** List of names of installed packages which are not loaded at startup. */
42 'core.disabledPackages': string[];
43
44 /** List of names of installed packages which are not automatically updated. */
45 'core.versionPinnedPackages': string[];
46
47 /**
48 * Associates scope names (e.g. "source.coffee") with arrays of file extensions
49 * and file names (e.g. ["Cakefile", ".coffee2"]).
50 */
51 'core.customFileTypes': {
52 [key: string]: string[];
53 };
54
55 /** Names of UI and syntax themes which will be used when Atom starts. */
56 'core.themes': string[];
57
58 /**
59 * Trigger the system's beep sound when certain actions cannot be executed or
60 * there are no results.
61 */
62 'core.audioBeep': boolean;
63
64 /** Close corresponding editors when a file is deleted outside Atom. */
65 'core.closeDeletedFileTabs': boolean;
66
67 /** When the last tab of a pane is closed, remove that pane as well. */
68 'core.destroyEmptyPanes': boolean;
69
70 /**
71 * When a window with no open tabs or panes is given the 'Close Tab' command,
72 * close that window.
73 */
74 'core.closeEmptyWindows': boolean;
75
76 /** Default character set encoding to use when reading and writing files. */
77 'core.fileEncoding': FileEncoding;
78
79 /**
80 * When checked opens an untitled editor when loading a blank environment (such as
81 * with 'File > New Window' or when "Restore Previous Windows On Start" is unchecked);
82 * otherwise, no editor is opened when loading a blank environment.
83 * This setting has no effect when restoring a previous state.
84 */
85 'core.openEmptyEditorOnStart': boolean;
86
87 /**
88 * When selected 'no', a blank environment is loaded. When selected 'yes' and Atom
89 * is started from the icon or `atom` by itself from the command line, restores the
90 * last state of all Atom windows; otherwise a blank environment is loaded. When
91 * selected 'always', restores the last state of all Atom windows always, no matter
92 * how Atom is started.
93 */
94 'core.restorePreviousWindowsOnStart': 'no' | 'yes' | 'always';
95
96 /** How many recent projects to show in the Reopen Project menu. */
97 'core.reopenProjectMenuCount': number;
98
99 /** Automatically update Atom when a new release is available. */
100 'core.automaticallyUpdate': boolean;
101
102 /** Use detected proxy settings when calling the `apm` command-line tool. */
103 'core.useProxySettingsWhenCallingApm': boolean;
104
105 /**
106 * Allow items to be previewed without adding them to a pane permanently, such as
107 * when single clicking files in the tree view.
108 */
109 'core.allowPendingPaneItems': boolean;
110
111 /**
112 * Allow usage statistics and exception reports to be sent to the Atom team to help
113 * improve the product.
114 */
115 'core.telemetryConsent': 'limited' | 'no' | 'undecided';
116
117 /** Warn before opening files larger than this number of megabytes. */
118 'core.warnOnLargeFileLimit': number;
119
120 /**
121 * Choose the underlying implementation used to watch for filesystem changes. Emulating
122 * changes will miss any events caused by applications other than Atom, but may help
123 * prevent crashes or freezes.
124 */
125 'core.fileSystemWatcher': 'native' | 'experimental' | 'poll' | 'atom';
126
127 /** Use the new Tree-sitter parsing system for supported languages. */
128 'core.useTreeSitterParsers': boolean;
129
130 /**
131 * Specify whether Atom should use the operating system's color profile (recommended)
132 * or an alternative color profile.
133 */
134 'core.colorProfile': 'default' | 'srgb';
135
136 'editor.commentStart': string | null;
137
138 'editor.commentEnd': string | null;
139
140 'editor.increaseIndentPattern': string | null;
141
142 'editor.decreaseIndentPattern': string | null;
143
144 'editor.foldEndPattern': string | null;
145
146 /** The name of the font family used for editor text. */
147 'editor.fontFamily': string;
148
149 /** Height in pixels of editor text. */
150 'editor.fontSize': number;
151
152 /** Height of editor lines, as a multiplier of font size. */
153 'editor.lineHeight': string | number;
154
155 /** Show cursor while there is a selection. */
156 'editor.showCursorOnSelection': boolean;
157
158 /** Render placeholders for invisible characters, such as tabs, spaces and newlines. */
159 'editor.showInvisibles': boolean;
160
161 /** Show indentation indicators in the editor. */
162 'editor.showIndentGuide': boolean;
163
164 /** Show line numbers in the editor's gutter. */
165 'editor.showLineNumbers': boolean;
166
167 /** Skip over tab-length runs of leading whitespace when moving the cursor. */
168 'editor.atomicSoftTabs': boolean;
169
170 /** Automatically indent the cursor when inserting a newline. */
171 'editor.autoIndent': boolean;
172
173 /** Automatically indent pasted text based on the indentation of the previous line. */
174 'editor.autoIndentOnPaste': boolean;
175
176 /** A string of non-word characters to define word boundaries. */
177 'editor.nonWordCharacters': string;
178
179 /**
180 * Identifies the length of a line which is used when wrapping text with the
181 * `Soft Wrap At Preferred Line Length` setting enabled, in number of characters.
182 */
183 'editor.preferredLineLength': number;
184
185 /**
186 * Defines the maximum width of the editor window before soft wrapping is enforced,
187 * in number of characters.
188 */
189 'editor.maxScreenLineLength': number;
190
191 /** Number of spaces used to represent a tab. */
192 'editor.tabLength': number;
193
194 /**
195 * Wraps lines that exceed the width of the window. When `Soft Wrap At Preferred
196 * Line Length` is set, it will wrap to the number of characters defined by the
197 * `Preferred Line Length` setting.
198 */
199 'editor.softWrap': boolean;
200
201 /**
202 * If the `Tab Type` config setting is set to "auto" and autodetection of tab type
203 * from buffer content fails, then this config setting determines whether a soft tab
204 * or a hard tab will be inserted when the Tab key is pressed.
205 */
206 'editor.softTabs': boolean;
207
208 /**
209 * Determine character inserted when Tab key is pressed. Possible values: "auto",
210 * "soft" and "hard". When set to "soft" or "hard", soft tabs (spaces) or hard tabs
211 * (tab characters) are used. When set to "auto", the editor auto-detects the tab
212 * type based on the contents of the buffer (it uses the first leading whitespace
213 * on a non-comment line), or uses the value of the Soft Tabs config setting if
214 * auto-detection fails.
215 */
216 'editor.tabType': 'auto' | 'soft' | 'hard';
217
218 /**
219 * Instead of wrapping lines to the window's width, wrap lines to the number of
220 * characters defined by the `Preferred Line Length` setting. This will only take
221 * effect when the soft wrap config setting is enabled globally or for the current
222 * language.
223 * **Note:** If you want to hide the wrap guide (the vertical line) you can disable
224 * the `wrap-guide` package.
225 */
226 'editor.softWrapAtPreferredLineLength': boolean;
227
228 /**
229 * When soft wrap is enabled, defines length of additional indentation applied to
230 * wrapped lines, in number of characters.
231 */
232 'editor.softWrapHangingIndent': number;
233
234 /** Determines how fast the editor scrolls when using a mouse or trackpad. */
235 'editor.scrollSensitivity': number;
236
237 /** Allow the editor to be scrolled past the end of the last line. */
238 'editor.scrollPastEnd': boolean;
239
240 /**
241 * Time interval in milliseconds within which text editing operations will be
242 * grouped together in the undo history.
243 */
244 'editor.undoGroupingInterval': number;
245
246 /**
247 * Show confirmation dialog when checking out the HEAD revision and discarding
248 * changes to current file since last commit.
249 */
250 'editor.confirmCheckoutHeadRevision': boolean;
251
252 /**
253 * A hash of characters Atom will use to render whitespace characters. Keys are
254 * whitespace character types, values are rendered characters (use value false to
255 * turn off individual whitespace character types).
256 */
257 'editor.invisibles': Invisibles;
258
259 /**
260 * Change the editor font size when pressing the Ctrl key and scrolling the mouse
261 * up/down.
262 */
263 'editor.zoomFontWhenCtrlScrolling': boolean;
264
265 // tslint:disable-next-line:no-any
266 [key: string]: any;
267 }
268}