import { foldingProvider, language, } from "@nuxtlabs/monarch-mdc";
import { activateAutoInsertion, activateMarkers, registerProviders, } from "@volar/monaco";
export default (monaco) => {
    const getSyncUris = () => monaco.editor.getModels().map(({ uri }) => uri), langs = ["vue", "markdown"], worker = monaco.editor.createWebWorker({
        label: "vue",
        moduleId: "vs/language/vue/vueWorker",
    });
    monaco.languages.register({ id: "vue" });
    monaco.languages.setMonarchTokensProvider("markdown", language);
    monaco.languages.registerFoldingRangeProvider("markdown", {
        provideFoldingRanges: (model) => foldingProvider(model),
    });
    void registerProviders(worker, langs, getSyncUris, monaco.languages);
    activateMarkers(worker, langs, "vue", getSyncUris, monaco.editor);
    activateAutoInsertion(worker, langs, getSyncUris, monaco.editor);
};
