Skip to content

Commit cdd59c1

Browse files
committed
fix: added minimalSetup example to playground
1 parent bdf2cd3 commit cdd59c1

File tree

5 files changed

+29
-6
lines changed

5 files changed

+29
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@
3535
},
3636
"dependencies": {
3737
"@babel/runtime": "^7.26.10",
38-
"@codemirror/lang-javascript": "^6.2.3",
3938
"@codemirror/autocomplete": "^6.18.6",
4039
"@codemirror/commands": "^6.8.0",
40+
"@codemirror/lang-javascript": "^6.2.3",
4141
"@codemirror/language": "^6.10.8",
4242
"@codemirror/lint": "^6.8.4",
4343
"@codemirror/search": "^6.5.10",

playground/app.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<script setup lang="ts">
22
import { javascript } from '@codemirror/lang-javascript'
33
import type { ViewUpdate } from '@codemirror/view'
4+
import { minimalSetup } from 'codemirror'
45
import type { CodeMirrorRef, Statistics } from '../src/runtime/types/nuxt-codemirror'
56
67
const code = ref('console.log("Hello, CodeMirror!");')
@@ -35,6 +36,8 @@ onMounted(() => {
3536
})
3637
</script>
3738

39+
<!-- Adding minimalSetup in the extensions array makes highlighting work, while it should work with basicSetup == true -->
40+
3841
<template>
3942
<NuxtCodeMirror
4043
ref="codemirror"

playground/nuxt.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,7 @@ export default defineNuxtConfig({
33
devtools: { enabled: true },
44
compatibilityDate: '2024-07-24',
55
nuxtCodemirror: {},
6+
devServer: {
7+
port: 4000,
8+
},
69
})

playground/package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,18 @@
88
"generate": "nuxi generate"
99
},
1010
"dependencies": {
11-
"@codemirror/lang-javascript": "^6.2.3",
12-
"@codemirror/language": "^6.10.8",
13-
"@nuxt/kit": "^3.16.0",
14-
"@uiw/codemirror-extensions-line-numbers-relative": "^4.23.10",
15-
"@uiw/codemirror-theme-okaidia": "^4.23.10",
1611
"@codemirror/autocomplete": "^6.18.6",
1712
"@codemirror/commands": "^6.8.0",
13+
"@codemirror/lang-javascript": "^6.2.3",
14+
"@codemirror/language": "^6.10.8",
1815
"@codemirror/lint": "^6.8.4",
1916
"@codemirror/search": "^6.5.10",
2017
"@codemirror/state": "6.5.2",
2118
"@codemirror/view": "6.36.4",
19+
"@nuxt/kit": "^3.16.0",
20+
"@uiw/codemirror-extensions-line-numbers-relative": "^4.23.10",
21+
"@uiw/codemirror-theme-okaidia": "^4.23.10",
22+
"codemirror": "^6.0.1",
2223
"nuxt": "^3.16.0"
2324
}
2425
}

playground/pnpm-lock.yaml

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)