@@ -140,6 +140,42 @@ 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
+ } )
170
+ CodeMirror . defineMode ( 'bash' , function ( config , modeConfig ) {
171
+ return CodeMirror . overlayMode ( CodeMirror . getMode ( config , 'text/x-sh' ) , ignoreOverlay )
172
+ } )
173
+ CodeMirror . defineMode ( 'ocaml' , function ( config , modeConfig ) {
174
+ return CodeMirror . overlayMode ( CodeMirror . getMode ( config , 'text/x-ocaml' ) , ignoreOverlay )
175
+ } )
176
+ CodeMirror . defineMode ( 'csvpreview' , function ( config , modeConfig ) {
177
+ return CodeMirror . overlayMode ( CodeMirror . getMode ( config , 'csv' ) , ignoreOverlay )
178
+ } )
143
179
CodeMirror . defineMode ( 'vega' , function ( config , modeConfig ) {
144
180
return CodeMirror . overlayMode ( CodeMirror . getMode ( config , 'application/ld+json' ) , ignoreOverlay )
145
181
} )
0 commit comments