From 452174a946d58c32fe68a309b56c5f4f86ba18c6 Mon Sep 17 00:00:00 2001 From: cfngc4594 Date: Fri, 28 Mar 2025 15:45:15 +0800 Subject: [PATCH] chore(editor): update Monaco Editor configuration for improved UX --- src/config/editor-option.ts | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/src/config/editor-option.ts b/src/config/editor-option.ts index b8d3585..cc64f87 100644 --- a/src/config/editor-option.ts +++ b/src/config/editor-option.ts @@ -1,27 +1,42 @@ import { type editor } from "monaco-editor"; export const DefaultEditorOptionConfig: editor.IEditorConstructionOptions = { - autoIndent: "full", - automaticLayout: true, - contextmenu: true, fontFamily: "Fira Code", fontLigatures: true, + lineHeight: 20, fontSize: 14, + bracketPairColorization: { + enabled: true, + }, + showFoldingControls: "always", guides: { bracketPairs: true, + bracketPairsHorizontal: "active", + highlightActiveBracketPair: true, + highlightActiveIndentation: "always", indentation: true, }, - hideCursorInOverviewRuler: true, - lineHeight: 20, - matchBrackets: "always", - minimap: { - enabled: false, + hover: { + above: false, }, - readOnly: false, scrollbar: { horizontalSliderSize: 10, verticalSliderSize: 10, }, - showFoldingControls: "always", wordWrap: "on", + minimap: { + enabled: false, + }, + smoothScrolling: true, + stickyScroll: { + enabled: true, + maxLineCount: 5, + }, + cursorBlinking: "smooth", + cursorSmoothCaretAnimation: "on", + suggestSelection: "recentlyUsed", + autoIndent: "full", + automaticLayout: true, + contextmenu: true, + matchBrackets: "always", };