0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-03-28 07:58:10 +00:00

default cm5 theme back

This commit is contained in:
Víctor Losada Hernández
2026-03-27 13:13:36 +01:00
parent c0b3a1940f
commit ad9f4773b0
6 changed files with 111 additions and 5 deletions

View File

@@ -22,7 +22,10 @@ import { markdown, markdownLanguage } from '@codemirror/lang-markdown';
import { autocompleteEmoji } from './autocompleteEmoji.js';
import { searchKeymap, search } from '@codemirror/search';
import * as themes from '@uiw/codemirror-themes-all';
import * as themesImport from '@uiw/codemirror-themes-all';
import { defaultCM5Theme } from '@themes/codeMirror/customThemes/default.js';
const themes = { default: defaultCM5Theme, ...themesImport };
const themeCompartment = new Compartment();
const highlightCompartment = new Compartment();
@@ -170,11 +173,11 @@ const CodeEditor = forwardRef(
openText : '▾',
closedText : '▸'
}),
themeCompartment.of(themeExtension),
highlightActiveLine(),
highlightActiveLineGutter(),
highlightCompartment.of(combinedHighlight),
themeCompartment.of(themeExtension),
autocompleteEmoji,
search(),
];