-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcodemirror-bundle.js
More file actions
99 lines (88 loc) · 2.17 KB
/
Copy pathcodemirror-bundle.js
File metadata and controls
99 lines (88 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
// CodeMirror 6 Complete Bundle
// This file exports everything needed for the editor
import { redo, redoDepth, undo, undoDepth } from "@codemirror/commands";
import {
defaultHighlightStyle,
syntaxHighlighting,
syntaxTree,
} from "@codemirror/language";
import { EditorState } from "@codemirror/state";
import { oneDark } from "@codemirror/theme-one-dark";
import {
EditorView,
highlightActiveLineGutter,
keymap,
lineNumbers,
} from "@codemirror/view";
import { basicSetup } from "codemirror";
// Language modes
import { cpp } from "@codemirror/lang-cpp";
import { css } from "@codemirror/lang-css";
import { go } from "@codemirror/lang-go";
import { html } from "@codemirror/lang-html";
import { java } from "@codemirror/lang-java";
import { javascript } from "@codemirror/lang-javascript";
import { json } from "@codemirror/lang-json";
import { less } from "@codemirror/lang-less";
import { markdown } from "@codemirror/lang-markdown";
import { php } from "@codemirror/lang-php";
import { python } from "@codemirror/lang-python";
import { rust } from "@codemirror/lang-rust";
import { sass } from "@codemirror/lang-sass";
import { sql } from "@codemirror/lang-sql";
import { wast } from "@codemirror/lang-wast";
import { xml } from "@codemirror/lang-xml";
import { yaml } from "@codemirror/lang-yaml";
import { openSearchPanel, search } from "@codemirror/search";
// Additional features
import { autocompletion } from "@codemirror/autocomplete";
import { linter, lintGutter } from "@codemirror/lint";
// Export everything as a single object
export default {
// Core
EditorState,
EditorView,
basicSetup,
lineNumbers,
highlightActiveLineGutter,
keymap,
// Commands
undo,
redo,
undoDepth,
redoDepth,
//search
search,
openSearchPanel,
// Language support
defaultHighlightStyle,
syntaxHighlighting,
syntaxTree,
// Theme
oneDark,
// Languages
languages: {
php,
javascript,
css,
html,
json,
python,
sql,
xml,
markdown,
java,
cpp,
rust,
go,
yaml,
sass,
less,
wast,
},
// Additional features
autocompletion,
linter,
lintGutter,
};
console.log("CodeMirror Bundle loaded successfully");