refactor(option): Rename code-editor-options.ts to option.ts and add wordWrap option
Renamed code-editor-options.ts to option.ts and added the wordWrap: "on" option to enable word wrapping in the code editor.
This commit is contained in:
parent
269f41525b
commit
4cd56f6fab
@ -8,7 +8,7 @@ import { highlighter } from "@/lib/shiki";
|
||||
import { DEFAULT_VALUE } from "@/config/value";
|
||||
import { shikiToMonaco } from "@shikijs/monaco";
|
||||
import { Skeleton } from "@/components/ui/skeleton";
|
||||
import { CODE_EDITOR_OPTIONS } from "@/constants/code-editor-options";
|
||||
import { CODE_EDITOR_OPTIONS } from "@/constants/option";
|
||||
import { SUPPORTED_LANGUAGE_SERVERS } from "@/config/language-server";
|
||||
import { useCodeEditorOption, useCodeEditorState } from "@/store/useCodeEditor";
|
||||
import { toSocket, WebSocketMessageReader, WebSocketMessageWriter } from "vscode-ws-jsonrpc";
|
||||
|
@ -7,19 +7,24 @@ export const CODE_EDITOR_OPTIONS: monaco.editor.IEditorConstructionOptions = {
|
||||
fontFamily: "Fira Code",
|
||||
fontLigatures: true,
|
||||
fontSize: 14,
|
||||
lineHeight: 20,
|
||||
guides: {
|
||||
bracketPairs: true,
|
||||
indentation: true,
|
||||
},
|
||||
hideCursorInOverviewRuler: true,
|
||||
lineHeight: 20,
|
||||
matchBrackets: "always",
|
||||
minimap: {
|
||||
enabled: false
|
||||
},
|
||||
wordWrap: "on",
|
||||
padding: {
|
||||
top: 18
|
||||
top: 8
|
||||
},
|
||||
readOnly: false,
|
||||
scrollbar: {
|
||||
horizontalSliderSize: 4,
|
||||
verticalSliderSize: 18
|
||||
}
|
||||
},
|
||||
showFoldingControls: "always",
|
||||
wordWrap: "on",
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
import { create } from "zustand";
|
||||
import * as monaco from "monaco-editor";
|
||||
import { DEFAULT_LANGUAGE } from "@/config/language";
|
||||
import { CODE_EDITOR_OPTIONS } from "@/constants/option";
|
||||
import { SupportedLanguage } from "@/constants/language";
|
||||
import { MonacoLanguageClient } from "monaco-languageclient";
|
||||
import { CODE_EDITOR_OPTIONS } from "@/constants/code-editor-options";
|
||||
|
||||
interface CodeEditorState {
|
||||
language: SupportedLanguage;
|
||||
|
Loading…
Reference in New Issue
Block a user