font family for codemirror.

This commit is contained in:
2023-04-14 09:36:37 +08:00
parent c45bd35590
commit 8c0a15123f

View File

@@ -9,10 +9,13 @@ 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({
"&": { "&": {
"font-family": 'Menlo, Monaco, Consolas, "Courier New", monospace', "font-family": theme.value.fontFamilyMono,
}, },
"&.cm-editor.cm-focused": { "&.cm-editor.cm-focused": {
outline: "none", outline: "none",