e-chan1007 / nuxt-monaco-editor

Integrate monaco-editor with Nuxt
https://e-chan1007.github.io/nuxt-monaco-editor
MIT License
119 stars 15 forks source link

How to change monaco config #34

Closed buksy90 closed 1 year ago

buksy90 commented 1 year ago

Hi,

could you please add more documentation on how to change Monaco config? I'm mostly interested in how to disable the minimap.

Thanks

cc-hearts commented 1 year ago

The hope can help you

<script setup lang="ts">
import { ref, watch } from 'vue'

const editorRef = ref(null)

onMounted(() => {
  editorRef.value!.$editor.updateOptions({
    minimap: { enabled: false },
  })
})
</script>
<template>
  <MonacoEditor
    ref="editorRef"
    theme="vs-dark"
  />
</template>