chore(code): add smart tab behaviour

This commit is contained in:
Elian Doran
2025-05-11 17:39:10 +03:00
parent 9bbe111dd9
commit 4bac03570c
5 changed files with 46 additions and 2 deletions

View File

@@ -5,6 +5,7 @@ import { Compartment, type Extension } from "@codemirror/state";
import { highlightSelectionMatches } from "@codemirror/search";
import { vim } from "@replit/codemirror-vim";
import byMimeType from "./syntax_highlighting.js";
import smartIndentWithTab from "./extensions/custom_tab.js";
type ContentChangedListener = () => void;
@@ -45,7 +46,7 @@ export default class CodeMirror extends EditorView {
keymap.of([
...defaultKeymap,
...historyKeymap,
indentWithTab
...smartIndentWithTab
])
]