Skip to content

Commit f836641

Browse files
authored
feat: Also use highlight style (#241)
The exports in `@codemirror/theme-one-dark` consist of two variables in an array, which makes up the extension: https://github.com/codemirror/theme-one-dark/blob/3f6f4e7ec22588df0e8c2777d8ce92889ce811b6/src/one-dark.ts#L134
1 parent 9e78952 commit f836641

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/useCodeMirror.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { basicSetup as defaultBasicSetup } from '@codemirror/basic-setup';
33
import { EditorState, StateEffect } from '@codemirror/state';
44
import { indentWithTab as defaultIndentWithTab } from '@codemirror/commands';
55
import { EditorView, keymap, ViewUpdate, placeholder as extendPlaceholder } from '@codemirror/view';
6-
import { oneDarkTheme } from '@codemirror/theme-one-dark';
6+
import { oneDark } from '@codemirror/theme-one-dark';
77
import { ReactCodeMirrorProps } from './';
88
import { defaultLightThemeOption } from './theme/light';
99

@@ -69,7 +69,7 @@ export function useCodeMirror(props: UseCodeMirror) {
6969
getExtensions.push(defaultLightThemeOption);
7070
break;
7171
case 'dark':
72-
getExtensions.push(oneDarkTheme);
72+
getExtensions.push(oneDark);
7373
break;
7474
default:
7575
getExtensions.push(theme);

0 commit comments

Comments
 (0)