vue-codemirror
vue-codemirror copied to clipboard
how to json for extensions?
Describe the bug
i use @codemirror/lang-json and i refer to the document to use javascript to write but it gives me the prompt “Unrecognized extension value in extension set ([object Object])“. can tell me how to use it? this is my code:
<Codemirror
v-model="codemirrorContent"
style="
height: 450px;
overflow: hidden;
text-align: left;
border: 1px solid #ccc;
"
:extensions="extensions"
>
</Codemirror>
<script setup lang="ts">
import { json } from "@codemirror/lang-json";
import { oneDark } from "@codemirror/theme-one-dark";
const extensions = [json(),oneDark]
</script>
Reproduction
System Info

Used Package Manager
npm
Validations
- [X] Read the the documentation in detail.
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- [X] The provided reproduction is a minimal reproducible example of the bug.