Write the logic template for updating themes
This commit is contained in:
@ -18,6 +18,7 @@ import {
|
||||
syntaxHighlighting,
|
||||
indentOnInput,
|
||||
bracketMatching,
|
||||
HighlightStyle,
|
||||
} from "@codemirror/language";
|
||||
import { defaultKeymap, historyKeymap, history } from "@codemirror/commands";
|
||||
import { searchKeymap, highlightSelectionMatches } from "@codemirror/search";
|
||||
@ -36,6 +37,15 @@ import { inlineHoveringTips } from "./documentation/inlineHelp";
|
||||
import { toposCompletions, soundCompletions } from "./documentation/inlineHelp";
|
||||
import { javascriptLanguage } from "@codemirror/lang-javascript";
|
||||
|
||||
export const updateCodeMirrorTheme = (theme: {[key: string]: string}): Extension => {
|
||||
let toposTheme = EditorView.theme({
|
||||
|
||||
});
|
||||
let toposHighlightStyle = HighlightStyle.define([]);
|
||||
return [ toposTheme, syntaxHighlighting(toposHighlightStyle),
|
||||
]
|
||||
}
|
||||
|
||||
export const jsCompletions = javascriptLanguage.data.of({
|
||||
autocomplete: toposCompletions,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user