added multicursor support on ctrl/cmd + click

This commit is contained in:
Dsm0 2025-07-10 15:03:22 -07:00
parent 6fe11be218
commit e7e321fe03
3 changed files with 11 additions and 0 deletions

View file

@ -38,6 +38,8 @@ const extensions = {
isFlashEnabled,
keybindings,
isTabIndentationEnabled: (on) => (on ? keymap.of([indentWithTab]) : []),
isMultiCursorEnabled: (on) =>
on ? [EditorState.allowMultipleSelections.of(true), EditorView.clickAddsSelectionRange.of((ev) => ev.metaKey || ev.ctrlKey)] : [],
};
const compartments = Object.fromEntries(Object.keys(extensions).map((key) => [key, new Compartment()]));
@ -53,6 +55,7 @@ export const defaultSettings = {
isTooltipEnabled: false,
isLineWrappingEnabled: false,
isTabIndentationEnabled: false,
isMultiCursorEnabled: false,
theme: 'strudelTheme',
fontFamily: 'monospace',
fontSize: 18,