From 07e3707c3fb211008cf3e2ce916a76487bbeda56 Mon Sep 17 00:00:00 2001 From: cfngc4594 Date: Thu, 20 Feb 2025 09:11:31 +0800 Subject: [PATCH] feat(editor): use predefined options for code editor configuration --- src/components/code-editor.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/code-editor.tsx b/src/components/code-editor.tsx index 8e784cf..777a61e 100644 --- a/src/components/code-editor.tsx +++ b/src/components/code-editor.tsx @@ -7,6 +7,7 @@ import normalizeUrl from "normalize-url"; import { highlighter } from "@/lib/shiki"; import { shikiToMonaco } from "@shikijs/monaco"; import { Skeleton } from "@/components/ui/skeleton"; +import { CODE_EDITOR_OPTIONS } from "@/constants/code-editor-options"; import { toSocket, WebSocketMessageReader, WebSocketMessageWriter } from "vscode-ws-jsonrpc"; const DynamicEditor = dynamic( @@ -81,7 +82,7 @@ export default function CodeEditor() { : "github-dark-default" } height="100%" - options={{ automaticLayout: true }} + options={CODE_EDITOR_OPTIONS} beforeMount={(monaco) => { shikiToMonaco(highlighter, monaco); }}