font family for codemirror.

This commit is contained in:
2023-04-14 10:13:18 +08:00
parent 8c0a15123f
commit e6b70848a0

View File

@@ -9,13 +9,10 @@ import { oneDark } from "./themes/oneDark"
import { smoothy } from "./themes/smoothy" import { smoothy } from "./themes/smoothy"
import { LANGUAGE } from "~/utils/types" import { LANGUAGE } from "~/utils/types"
import { isDark } from "./composables/dark" import { isDark } from "./composables/dark"
import { useThemeVars } from "naive-ui"
const theme = useThemeVars()
const styleTheme = EditorView.baseTheme({ const styleTheme = EditorView.baseTheme({
"&": { "&.cm-scroller": {
"font-family": theme.value.fontFamilyMono, "font-family": "Consolas",
}, },
"&.cm-editor.cm-focused": { "&.cm-editor.cm-focused": {
outline: "none", outline: "none",