main
ts 45 lines 1.03 KB
Raw
1 /**
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8 import type {EditorProps} from '@monaco-editor/react';
9
10 export const monacoOptions: Partial<EditorProps['options']> = {
11 fontSize: 14,
12 padding: {top: 8},
13 scrollbar: {
14 verticalScrollbarSize: 10,
15 alwaysConsumeMouseWheel: false,
16 },
17 minimap: {
18 enabled: false,
19 },
20 formatOnPaste: true,
21 formatOnType: true,
22 fontFamily: '"Source Code Pro", monospace',
23 glyphMargin: true,
24
25 autoClosingBrackets: 'languageDefined',
26 autoClosingDelete: 'always',
27 autoClosingOvertype: 'always',
28
29 automaticLayout: true,
30 wordWrap: 'on',
31 wrappingIndent: 'same',
32
33 tabSize: 2,
34 };
35
36 export const monacoConfigOptions: Partial<EditorProps['options']> = {
37 ...monacoOptions,
38 lineNumbers: 'off',
39 renderLineHighlight: 'none',
40 overviewRulerBorder: false,
41 overviewRulerLanes: 0,
42 fontSize: 12,
43 scrollBeyondLastLine: false,
44 glyphMargin: false,
45 };