renaming
This commit is contained in:
@ -3,7 +3,7 @@ import { examples } from "./examples/excerpts";
|
|||||||
import { EditorState, Compartment } from "@codemirror/state";
|
import { EditorState, Compartment } from "@codemirror/state";
|
||||||
import { ViewUpdate, lineNumbers, keymap } from "@codemirror/view";
|
import { ViewUpdate, lineNumbers, keymap } from "@codemirror/view";
|
||||||
import { javascript } from "@codemirror/lang-javascript";
|
import { javascript } from "@codemirror/lang-javascript";
|
||||||
import { materialDark } from "./themes/materialDark";
|
import { toposTheme } from "./themes/toposTheme";
|
||||||
import { markdown } from "@codemirror/lang-markdown";
|
import { markdown } from "@codemirror/lang-markdown";
|
||||||
import { Extension, Prec } from "@codemirror/state";
|
import { Extension, Prec } from "@codemirror/state";
|
||||||
import { indentWithTab } from "@codemirror/commands";
|
import { indentWithTab } from "@codemirror/commands";
|
||||||
@ -254,7 +254,7 @@ export class Editor {
|
|||||||
this.fontSize.of(fontModif),
|
this.fontSize.of(fontModif),
|
||||||
this.vimModeCompartment.of(vimPlugin),
|
this.vimModeCompartment.of(vimPlugin),
|
||||||
editorSetup,
|
editorSetup,
|
||||||
materialDark,
|
toposTheme,
|
||||||
this.chosenLanguage.of(javascript()),
|
this.chosenLanguage.of(javascript()),
|
||||||
EditorView.updateListener.of((v: ViewUpdate) => {
|
EditorView.updateListener.of((v: ViewUpdate) => {
|
||||||
v;
|
v;
|
||||||
|
|||||||
@ -49,11 +49,10 @@ const invalid = base_red,
|
|||||||
highlightBackground = "#545b61",
|
highlightBackground = "#545b61",
|
||||||
background = base00,
|
background = base00,
|
||||||
tooltipBackground = base01,
|
tooltipBackground = base01,
|
||||||
selection = base07,
|
|
||||||
cursor = base04;
|
cursor = base04;
|
||||||
|
|
||||||
/// The editor theme styles for Material Dark.
|
/// The editor theme styles for Material Dark.
|
||||||
export const materialDarkTheme = EditorView.theme(
|
export const toposDarkTheme = EditorView.theme(
|
||||||
{
|
{
|
||||||
"&": {
|
"&": {
|
||||||
color: base05,
|
color: base05,
|
||||||
@ -134,7 +133,7 @@ export const materialDarkTheme = EditorView.theme(
|
|||||||
);
|
);
|
||||||
|
|
||||||
/// The highlighting style for code in the Material Dark theme.
|
/// The highlighting style for code in the Material Dark theme.
|
||||||
export const materialDarkHighlightStyle = HighlightStyle.define([
|
export const toposDarkHighlightStyle = HighlightStyle.define([
|
||||||
{ tag: t.keyword, color: base_purple },
|
{ tag: t.keyword, color: base_purple },
|
||||||
{
|
{
|
||||||
tag: [t.name, t.deleted, t.character, t.macroName],
|
tag: [t.name, t.deleted, t.character, t.macroName],
|
||||||
@ -232,7 +231,7 @@ export const materialDarkHighlightStyle = HighlightStyle.define([
|
|||||||
|
|
||||||
/// Extension to enable the Material Dark theme (both the editor theme and
|
/// Extension to enable the Material Dark theme (both the editor theme and
|
||||||
/// the highlight style).
|
/// the highlight style).
|
||||||
export const materialDark: Extension = [
|
export const toposTheme: Extension = [
|
||||||
materialDarkTheme,
|
toposDarkTheme,
|
||||||
syntaxHighlighting(materialDarkHighlightStyle),
|
syntaxHighlighting(toposDarkHighlightStyle),
|
||||||
];
|
];
|
||||||
Reference in New Issue
Block a user