import {css} from '@codemirror/lang-css';
import {json} from '@codemirror/lang-json';
import {javascript} from '@codemirror/lang-javascript';
import {css} from '@codemirror/lang-css';
import {json} from '@codemirror/lang-json';
import {javascript} from '@codemirror/lang-javascript';
const modes = await window.importVersioned('legacy-modes');
return StreamLanguage.define(modes[mode]);
};
const modes = await window.importVersioned('legacy-modes');
return StreamLanguage.define(modes[mode]);
};
// Mapping of possible languages or formats from user input to their codemirror modes.
// Value can be a mode string or a function that will receive the code content & return the mode string.
// The function option is used in the event the exact mode could be dynamic depending on the code.
// Mapping of possible languages or formats from user input to their codemirror modes.
// Value can be a mode string or a function that will receive the code content & return the mode string.
// The function option is used in the event the exact mode could be dynamic depending on the code.
css: async () => css(),
'c++': () => legacyLoad('cpp'),
'c#': () => legacyLoad('csharp'),
css: async () => css(),
'c++': () => legacyLoad('cpp'),
'c#': () => legacyLoad('csharp'),
csharp: () => legacyLoad('csharp'),
dart: () => legacyLoad('dart'),
diff: () => legacyLoad('diff'),
csharp: () => legacyLoad('csharp'),
dart: () => legacyLoad('dart'),
diff: () => legacyLoad('diff'),
pascal: () => legacyLoad('pascal'),
perl: () => legacyLoad('perl'),
pgsql: () => legacyLoad('pgSQL'),
pascal: () => legacyLoad('pascal'),
perl: () => legacyLoad('perl'),
pgsql: () => legacyLoad('pgSQL'),