Fix Codemirror performance!!

This commit is contained in:
Gregory Schier
2023-03-09 10:50:55 -08:00
parent 4d806ff2b1
commit e4f6c919dc
19 changed files with 848 additions and 211 deletions

View File

@@ -25,7 +25,6 @@ import {
crosshairCursor,
drawSelection,
dropCursor,
highlightActiveLine,
highlightActiveLineGutter,
highlightSpecialChars,
keymap,
@@ -116,7 +115,6 @@ export const baseExtensions = [
export const multiLineExtensions = [
lineNumbers(),
highlightActiveLineGutter(),
foldGutter({
markerDOM: (open) => {
const el = document.createElement('div');
@@ -130,11 +128,10 @@ export const multiLineExtensions = [
}),
EditorState.allowMultipleSelections.of(true),
indentOnInput(),
bracketMatching(),
closeBrackets(),
rectangularSelection(),
crosshairCursor(),
highlightActiveLine(),
highlightActiveLineGutter(),
highlightSelectionMatches({ minSelectionLength: 2 }),
keymap.of([
...closeBracketsKeymap,