Skip to content

Commit f9b265f

Browse files
authored
feat: add Vue language to CodeMirror (#256)
1 parent 3b480db commit f9b265f

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

packages/components/react/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
"@codemirror/lang-json": "^6.0.1",
6363
"@codemirror/lang-markdown": "^6.2.5",
6464
"@codemirror/lang-sass": "^6.0.2",
65+
"@codemirror/lang-vue": "^0.1.3",
6566
"@codemirror/lang-wast": "^6.0.2",
6667
"@codemirror/language": "^6.10.2",
6768
"@codemirror/state": "^6.4.1",

packages/components/react/src/core/CodeMirrorEditor/languages.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,13 @@ export const supportedLanguages = [
7878
return import('@codemirror/lang-wast').then((module) => module.wast());
7979
},
8080
}),
81+
LanguageDescription.of({
82+
name: 'Vue',
83+
extensions: ['vue'],
84+
async load() {
85+
return import('@codemirror/lang-vue').then((module) => module.vue());
86+
},
87+
}),
8188
LanguageDescription.of({
8289
name: 'Svelte',
8390
extensions: ['svelte'],

pnpm-lock.yaml

Lines changed: 14 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)