mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-18 15:26:33 +00:00
feat(editor): use predefined options for code editor configuration
This commit is contained in:
parent
01f188ac56
commit
07e3707c3f
@ -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);
|
||||
}}
|
||||
|
Loading…
Reference in New Issue
Block a user