1 | import { Extension } from '@codemirror/state';
|
2 | export { EditorView } from '@codemirror/view';
|
3 |
|
4 | /**
|
5 | This is an extension value that just pulls together a number of
|
6 | extensions that you might want in a basic editor. It is meant as a
|
7 | convenient helper to quickly set up CodeMirror without installing
|
8 | and importing a lot of separate packages.
|
9 |
|
10 | Specifically, it includes...
|
11 |
|
12 | - [the default command bindings](https://codemirror.net/6/docs/ref/#commands.defaultKeymap)
|
13 | - [line numbers](https://codemirror.net/6/docs/ref/#view.lineNumbers)
|
14 | - [special character highlighting](https://codemirror.net/6/docs/ref/#view.highlightSpecialChars)
|
15 | - [the undo history](https://codemirror.net/6/docs/ref/#commands.history)
|
16 | - [a fold gutter](https://codemirror.net/6/docs/ref/#language.foldGutter)
|
17 | - [custom selection drawing](https://codemirror.net/6/docs/ref/#view.drawSelection)
|
18 | - [drop cursor](https://codemirror.net/6/docs/ref/#view.dropCursor)
|
19 | - [multiple selections](https://codemirror.net/6/docs/ref/#state.EditorState^allowMultipleSelections)
|
20 | - [reindentation on input](https://codemirror.net/6/docs/ref/#language.indentOnInput)
|
21 | - [the default highlight style](https://codemirror.net/6/docs/ref/#language.defaultHighlightStyle) (as fallback)
|
22 | - [bracket matching](https://codemirror.net/6/docs/ref/#language.bracketMatching)
|
23 | - [bracket closing](https://codemirror.net/6/docs/ref/#autocomplete.closeBrackets)
|
24 | - [autocompletion](https://codemirror.net/6/docs/ref/#autocomplete.autocompletion)
|
25 | - [rectangular selection](https://codemirror.net/6/docs/ref/#view.rectangularSelection) and [crosshair cursor](https://codemirror.net/6/docs/ref/#view.crosshairCursor)
|
26 | - [active line highlighting](https://codemirror.net/6/docs/ref/#view.highlightActiveLine)
|
27 | - [active line gutter highlighting](https://codemirror.net/6/docs/ref/#view.highlightActiveLineGutter)
|
28 | - [selection match highlighting](https://codemirror.net/6/docs/ref/#search.highlightSelectionMatches)
|
29 | - [search](https://codemirror.net/6/docs/ref/#search.searchKeymap)
|
30 | - [linting](https://codemirror.net/6/docs/ref/#lint.lintKeymap)
|
31 |
|
32 | (You'll probably want to add some language package to your setup
|
33 | too.)
|
34 |
|
35 | This extension does not allow customization. The idea is that,
|
36 | once you decide you want to configure your editor more precisely,
|
37 | you take this package's source (which is just a bunch of imports
|
38 | and an array literal), copy it into your own code, and adjust it
|
39 | as desired.
|
40 | */
|
41 | declare const basicSetup: Extension;
|
42 | /**
|
43 | A minimal set of extensions to create a functional editor. Only
|
44 | includes [the default keymap](https://codemirror.net/6/docs/ref/#commands.defaultKeymap), [undo
|
45 | history](https://codemirror.net/6/docs/ref/#commands.history), [special character
|
46 | highlighting](https://codemirror.net/6/docs/ref/#view.highlightSpecialChars), [custom selection
|
47 | drawing](https://codemirror.net/6/docs/ref/#view.drawSelection), and [default highlight
|
48 | style](https://codemirror.net/6/docs/ref/#language.defaultHighlightStyle).
|
49 | */
|
50 | declare const minimalSetup: Extension;
|
51 |
|
52 | export { basicSetup, minimalSetup };
|