Open francisashley opened 1 year ago
+1
+1
I'm encoutered same issue, this is my hacky solution:
import { install } from 'vue-codemirror';
// override vue-codemirror extensions
app.use(install, { extensions: [] });
Then, you can combine yourself's extensions, e.g.
<template>
<Codemirror
:extensions="[basicSetup]"
></Codemirror>
</template>
<script setup lang="ts">
import { basicSetup } from './setup';
</script>
Clear and concise description of the problem
I see in src/config.ts that
vue-codemirror
usesimport { basicSetup } from 'codemirror'
to set the default config which according to the docs is convieniant way of quickly getting a basic editor working. The docs also mention this config must be replaced when looking to customise codemirror:When inspecting src/config.ts and src/component.ts (onMounted) it looks we can only extend the config but not override it.. so unless I'm mistaken, we're limited in how much we can control
vue-codemirror
and cannot remove thegutter
andlineNumber
..?Suggested solution
Add support for replace the default codemirror extensions
Alternative
No response
Additional context
No response
Validations