Skip to content

Commit a2390ec

Browse files
committed
set the theme as dark
1 parent a17aae8 commit a2390ec

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/components/CodeMirror.res

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,11 @@ module CM6 = {
154154
@send
155155
external dispatchEffects: (editorView, dispatchEffectsArg) => unit = "dispatch"
156156

157+
module ThemeOptions = {
158+
type t = {dark?: bool}
159+
}
157160
@module("@codemirror/view") @scope("EditorView") @val
158-
external theme: dict<dict<string>> => extension = "theme"
161+
external theme: (dict<dict<string>>, ~options: ThemeOptions.t=?) => extension = "theme"
159162

160163
@module("@codemirror/view") @scope("EditorView") @val
161164
external lineWrapping: extension = "lineWrapping"
@@ -698,6 +701,7 @@ let createEditor = (config: editorConfig): editorInstance => {
698701
},
699702
".cm-selectionMatch": dict{"backgroundColor": "#aafe661a"},
700703
},
704+
~options={dark: true},
701705
),
702706
CM6.EditorView.drawSelection(),
703707
CM6.EditorView.dropCursor(),

0 commit comments

Comments
 (0)