@@ -140,13 +140,49 @@ export default class Editor {
140
140
}
141
141
}
142
142
143
+ CodeMirror . defineMode ( 'c' , function ( config , modeConfig ) {
144
+ return CodeMirror . overlayMode ( CodeMirror . getMode ( config , 'text/x-csrc' ) , ignoreOverlay )
145
+ } )
146
+ CodeMirror . defineMode ( 'cpp' , function ( config , modeConfig ) {
147
+ return CodeMirror . overlayMode ( CodeMirror . getMode ( config , 'text/x-c++src' ) , ignoreOverlay )
148
+ } )
149
+ CodeMirror . defineMode ( 'java' , function ( config , modeConfig ) {
150
+ return CodeMirror . overlayMode ( CodeMirror . getMode ( config , 'text/x-java' ) , ignoreOverlay )
151
+ } )
152
+ CodeMirror . defineMode ( 'csharp' , function ( config , modeConfig ) {
153
+ return CodeMirror . overlayMode ( CodeMirror . getMode ( config , 'text/x-csharp' ) , ignoreOverlay )
154
+ } )
155
+ CodeMirror . defineMode ( 'objectivec' , function ( config , modeConfig ) {
156
+ return CodeMirror . overlayMode ( CodeMirror . getMode ( config , 'text/x-objectivec' ) , ignoreOverlay )
157
+ } )
158
+ CodeMirror . defineMode ( 'scala' , function ( config , modeConfig ) {
159
+ return CodeMirror . overlayMode ( CodeMirror . getMode ( config , 'text/x-scala' ) , ignoreOverlay )
160
+ } )
161
+ CodeMirror . defineMode ( 'kotlin' , function ( config , modeConfig ) {
162
+ return CodeMirror . overlayMode ( CodeMirror . getMode ( config , 'text/x-kotlin' ) , ignoreOverlay )
163
+ } )
164
+ CodeMirror . defineMode ( 'json' , function ( config , modeConfig ) {
165
+ return CodeMirror . overlayMode ( CodeMirror . getMode ( config , 'application/json' ) , ignoreOverlay )
166
+ } )
167
+ CodeMirror . defineMode ( 'jsonld' , function ( config , modeConfig ) {
168
+ return CodeMirror . overlayMode ( CodeMirror . getMode ( config , 'application/ld+json' ) , ignoreOverlay )
169
+ } )
143
170
CodeMirror . defineMode ( 'vega' , function ( config , modeConfig ) {
144
171
return CodeMirror . overlayMode ( CodeMirror . getMode ( config , 'application/ld+json' ) , ignoreOverlay )
145
172
} )
146
-
147
173
CodeMirror . defineMode ( 'markmap' , function ( config , modeConfig ) {
148
174
return CodeMirror . overlayMode ( CodeMirror . getMode ( config , 'gfm' ) , ignoreOverlay )
149
175
} )
176
+
177
+ CodeMirror . defineMode ( 'bash' , function ( config , modeConfig ) {
178
+ return CodeMirror . overlayMode ( CodeMirror . getMode ( config , 'text/x-sh' ) , ignoreOverlay )
179
+ } )
180
+ CodeMirror . defineMode ( 'ocaml' , function ( config , modeConfig ) {
181
+ return CodeMirror . overlayMode ( CodeMirror . getMode ( config , 'text/x-ocaml' ) , ignoreOverlay )
182
+ } )
183
+ CodeMirror . defineMode ( 'csvpreview' , function ( config , modeConfig ) {
184
+ return CodeMirror . overlayMode ( CodeMirror . getMode ( config , 'csv' ) , ignoreOverlay )
185
+ } )
150
186
}
151
187
152
188
on ( event , cb ) {
0 commit comments