mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-09-26 06:51:31 +08:00
chore(code): enable syntax highlighting plugin
This commit is contained in:
parent
385809df84
commit
71218c0bd4
@ -1,5 +1,6 @@
|
|||||||
import { defaultKeymap, indentWithTab } from "@codemirror/commands";
|
import { defaultKeymap, indentWithTab } from "@codemirror/commands";
|
||||||
import { EditorView, keymap, lineNumbers, ViewUpdate, type EditorViewConfig, type KeyBinding } from "@codemirror/view";
|
import { EditorView, keymap, lineNumbers, ViewUpdate, type EditorViewConfig, type KeyBinding } from "@codemirror/view";
|
||||||
|
import { defaultHighlightStyle, syntaxHighlighting } from "@codemirror/language";
|
||||||
|
|
||||||
type ContentChangedListener = () => void;
|
type ContentChangedListener = () => void;
|
||||||
|
|
||||||
@ -17,6 +18,7 @@ export default class CodeMirror extends EditorView {
|
|||||||
...defaultKeymap,
|
...defaultKeymap,
|
||||||
indentWithTab
|
indentWithTab
|
||||||
]),
|
]),
|
||||||
|
syntaxHighlighting(defaultHighlightStyle),
|
||||||
lineNumbers()
|
lineNumbers()
|
||||||
];
|
];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user