Skip to content
This repository was archived by the owner on Apr 15, 2026. It is now read-only.

Commit e5486dd

Browse files
committed
Include crosshairCursor
FEATURE: Add the extension that shows a crosshair cursor when Alt is held down to the basic setup. Issue codemirror/dev#789
1 parent eaa94b7 commit e5486dd

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"@codemirror/language": "^0.19.0",
3838
"@codemirror/lint": "^0.19.0",
3939
"@codemirror/matchbrackets": "^0.19.0",
40-
"@codemirror/rectangular-selection": "^0.19.0",
40+
"@codemirror/rectangular-selection": "^0.19.2",
4141
"@codemirror/search": "^0.19.0",
4242
"@codemirror/state": "^0.19.0",
4343
"@codemirror/view": "^0.19.31"

src/basic-setup.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {closeBrackets, closeBracketsKeymap} from "@codemirror/closebrackets"
1010
import {searchKeymap, highlightSelectionMatches} from "@codemirror/search"
1111
import {autocompletion, completionKeymap} from "@codemirror/autocomplete"
1212
import {commentKeymap} from "@codemirror/comment"
13-
import {rectangularSelection} from "@codemirror/rectangular-selection"
13+
import {rectangularSelection, crosshairCursor} from "@codemirror/rectangular-selection"
1414
import {defaultHighlightStyle} from "@codemirror/highlight"
1515
import {lintKeymap} from "@codemirror/lint"
1616

@@ -34,7 +34,7 @@ import {lintKeymap} from "@codemirror/lint"
3434
/// - [bracket matching](#matchbrackets.bracketMatching)
3535
/// - [bracket closing](#closebrackets.closeBrackets)
3636
/// - [autocompletion](#autocomplete.autocompletion)
37-
/// - [rectangular selection](#rectangular-selection.rectangularSelection)
37+
/// - [rectangular selection](#rectangular-selection.rectangularSelection) and [crosshair cursor](#rectangular-selection.crosshairCursor)
3838
/// - [active line highlighting](#view.highlightActiveLine)
3939
/// - [active line gutter highlighting](#gutter.highlightActiveLineGutter)
4040
/// - [selection match highlighting](#search.highlightSelectionMatches)
@@ -65,6 +65,7 @@ export const basicSetup: Extension = [
6565
closeBrackets(),
6666
autocompletion(),
6767
rectangularSelection(),
68+
crosshairCursor(),
6869
highlightActiveLine(),
6970
highlightSelectionMatches(),
7071
keymap.of([

0 commit comments

Comments
 (0)