aboutsummaryrefslogtreecommitdiffstats
path: root/subprojects/frontend/src/editor/EditorStore.ts
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2022-07-27 16:34:14 +0200
committerLibravatar Kristóf Marussy <kristof@marussy.com>2022-07-27 16:34:14 +0200
commitdeaa0580d952b77cf9e6df024d1f71ed29f53fc0 (patch)
tree95a4e538b21c13674de99a6645bae1424714721a /subprojects/frontend/src/editor/EditorStore.ts
parentdocs: Add note about proxy settings (diff)
downloadrefinery-deaa0580d952b77cf9e6df024d1f71ed29f53fc0.tar.gz
refinery-deaa0580d952b77cf9e6df024d1f71ed29f53fc0.tar.zst
refinery-deaa0580d952b77cf9e6df024d1f71ed29f53fc0.zip
chore: bump dependencies
Diffstat (limited to 'subprojects/frontend/src/editor/EditorStore.ts')
-rw-r--r--subprojects/frontend/src/editor/EditorStore.ts40
1 files changed, 24 insertions, 16 deletions
diff --git a/subprojects/frontend/src/editor/EditorStore.ts b/subprojects/frontend/src/editor/EditorStore.ts
index 5760de28..0f4d2936 100644
--- a/subprojects/frontend/src/editor/EditorStore.ts
+++ b/subprojects/frontend/src/editor/EditorStore.ts
@@ -1,27 +1,32 @@
1import { autocompletion, completionKeymap } from '@codemirror/autocomplete';
2import { closeBrackets, closeBracketsKeymap } from '@codemirror/closebrackets';
3import { defaultKeymap, indentWithTab } from '@codemirror/commands';
4import { commentKeymap } from '@codemirror/comment';
5import { foldGutter, foldKeymap } from '@codemirror/fold';
6import { highlightActiveLineGutter, lineNumbers } from '@codemirror/gutter';
7import { classHighlightStyle } from '@codemirror/highlight';
8import { 1import {
2 closeBrackets,
3 closeBracketsKeymap,
4 autocompletion,
5 completionKeymap,
6} from '@codemirror/autocomplete';
7import {
8 defaultKeymap,
9 history, 9 history,
10 historyKeymap, 10 historyKeymap,
11 indentWithTab,
11 redo, 12 redo,
12 redoDepth, 13 redoDepth,
13 undo, 14 undo,
14 undoDepth, 15 undoDepth,
15} from '@codemirror/history'; 16} from '@codemirror/commands';
16import { indentOnInput } from '@codemirror/language'; 17import {
18 bracketMatching,
19 foldGutter,
20 foldKeymap,
21 indentOnInput,
22 syntaxHighlighting,
23} from '@codemirror/language';
17import { 24import {
18 Diagnostic, 25 Diagnostic,
19 lintKeymap, 26 lintKeymap,
20 setDiagnostics, 27 setDiagnostics,
21} from '@codemirror/lint'; 28} from '@codemirror/lint';
22import { bracketMatching } from '@codemirror/matchbrackets'; 29import { search, searchKeymap } from '@codemirror/search';
23import { rectangularSelection } from '@codemirror/rectangular-selection';
24import { searchConfig, searchKeymap } from '@codemirror/search';
25import { 30import {
26 EditorState, 31 EditorState,
27 StateCommand, 32 StateCommand,
@@ -33,9 +38,13 @@ import {
33 drawSelection, 38 drawSelection,
34 EditorView, 39 EditorView,
35 highlightActiveLine, 40 highlightActiveLine,
41 highlightActiveLineGutter,
36 highlightSpecialChars, 42 highlightSpecialChars,
37 keymap, 43 keymap,
44 lineNumbers,
45 rectangularSelection,
38} from '@codemirror/view'; 46} from '@codemirror/view';
47import { classHighlighter } from '@lezer/highlight';
39import { 48import {
40 makeAutoObservable, 49 makeAutoObservable,
41 observable, 50 observable,
@@ -91,7 +100,6 @@ export class EditorStore {
91 (context) => this.client.contentAssist(context), 100 (context) => this.client.contentAssist(context),
92 ], 101 ],
93 }), 102 }),
94 classHighlightStyle.extension,
95 closeBrackets(), 103 closeBrackets(),
96 bracketMatching(), 104 bracketMatching(),
97 drawSelection(), 105 drawSelection(),
@@ -106,10 +114,11 @@ export class EditorStore {
106 history(), 114 history(),
107 indentOnInput(), 115 indentOnInput(),
108 rectangularSelection(), 116 rectangularSelection(),
109 searchConfig({ 117 search({
110 top: true, 118 top: true,
111 matchCase: true, 119 caseSensitive: true,
112 }), 120 }),
121 syntaxHighlighting(classHighlighter),
113 semanticHighlighting, 122 semanticHighlighting,
114 // We add the gutters to `extensions` in the order we want them to appear. 123 // We add the gutters to `extensions` in the order we want them to appear.
115 lineNumbers(), 124 lineNumbers(),
@@ -117,7 +126,6 @@ export class EditorStore {
117 keymap.of([ 126 keymap.of([
118 { key: 'Mod-Shift-f', run: () => this.formatText() }, 127 { key: 'Mod-Shift-f', run: () => this.formatText() },
119 ...closeBracketsKeymap, 128 ...closeBracketsKeymap,
120 ...commentKeymap,
121 ...completionKeymap, 129 ...completionKeymap,
122 ...foldKeymap, 130 ...foldKeymap,
123 ...historyKeymap, 131 ...historyKeymap,