mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-10-05 12:42:04 +08:00
fix(code): reintroduce indent with tab
This commit is contained in:
parent
3e5e9096d2
commit
385809df84
@ -1,5 +1,5 @@
|
||||
import { defaultKeymap } from "@codemirror/commands";
|
||||
import { EditorView, keymap, lineNumbers, ViewUpdate, type EditorViewConfig } from "@codemirror/view";
|
||||
import { defaultKeymap, indentWithTab } from "@codemirror/commands";
|
||||
import { EditorView, keymap, lineNumbers, ViewUpdate, type EditorViewConfig, type KeyBinding } from "@codemirror/view";
|
||||
|
||||
type ContentChangedListener = () => void;
|
||||
|
||||
@ -13,7 +13,10 @@ export default class CodeMirror extends EditorView {
|
||||
|
||||
constructor(config: EditorConfig) {
|
||||
let extensions = [
|
||||
keymap.of(defaultKeymap),
|
||||
keymap.of([
|
||||
...defaultKeymap,
|
||||
indentWithTab
|
||||
]),
|
||||
lineNumbers()
|
||||
];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user