Hi! I'm not able to do syntax highlighting works, I'm not sure if it is my problem or if something of the dependency. I'm using vue3 with nuxt. Here is my code component:
<template>
<client-only>
<code-mirror v-model="value"
:extensions="extensions"
:style="{ height: '400px', width: '600px'}"
:tab-size="2"
:lang="css()"
tab/>
</client-only>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import CodeMirror from 'vue-codemirror6';
import type { LanguageSupport } from '@codemirror/language';
import { javascript } from '@codemirror/lang-javascript';
import { python } from "@codemirror/lang-python";
import { css } from '@codemirror/lang-css';
import { oneDark } from '@codemirror/theme-one-dark';
const value = ref('/* ESCRIBE TU CSS */');
const langCss: LanguageSupport = css();
const langJs: LanguageSupport = javascript();
const langPython: LanguageSupport = python();
const getExtensions = () => {
return
};
const extensions = ref([
oneDark]);
</script>
Hi! I'm not able to do syntax highlighting works, I'm not sure if it is my problem or if something of the dependency. I'm using vue3 with nuxt. Here is my code component:
Thnx a lot!