From 01f188ac565c3e549a98f80e486d5cecb4d2826c Mon Sep 17 00:00:00 2001 From: cfngc4594 Date: Thu, 20 Feb 2025 09:11:20 +0800 Subject: [PATCH] feat(editor): add default configuration for Monaco code editor --- src/constants/code-editor-options.ts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/constants/code-editor-options.ts diff --git a/src/constants/code-editor-options.ts b/src/constants/code-editor-options.ts new file mode 100644 index 0000000..0198484 --- /dev/null +++ b/src/constants/code-editor-options.ts @@ -0,0 +1,24 @@ +import * as monaco from "monaco-editor" + +export const CODE_EDITOR_OPTIONS: monaco.editor.IEditorConstructionOptions = { + autoIndent: "full", + automaticLayout: true, + contextmenu: true, + fontFamily: "Fira Code", + fontLigatures: true, + fontSize: 14, + lineHeight: 20, + hideCursorInOverviewRuler: true, + matchBrackets: "always", + minimap: { + enabled: false + }, + padding: { + top: 8 + }, + readOnly: false, + scrollbar: { + horizontalSliderSize: 4, + verticalSliderSize: 18 + } +}