From f625c0226051c1255ec275eab4b8850a72e05a61 Mon Sep 17 00:00:00 2001 From: Rob Koch Date: Sat, 7 Dec 2024 11:54:31 -0800 Subject: [PATCH] add vue support for codemirror --- app/components/editor/codemirror/languages.ts | 7 +++++++ package.json | 1 + 2 files changed, 8 insertions(+) diff --git a/app/components/editor/codemirror/languages.ts b/app/components/editor/codemirror/languages.ts index 829221ec..94d3072f 100644 --- a/app/components/editor/codemirror/languages.ts +++ b/app/components/editor/codemirror/languages.ts @@ -1,6 +1,13 @@ import { LanguageDescription } from '@codemirror/language'; export const supportedLanguages = [ + LanguageDescription.of({ + name: 'VUE', + extensions: ['vue'], + async load() { + return import('@codemirror/lang-vue').then((module) => module.vue()); + }, + }), LanguageDescription.of({ name: 'TS', extensions: ['ts'], diff --git a/package.json b/package.json index 1cd5c606..9abd9537 100644 --- a/package.json +++ b/package.json @@ -44,6 +44,7 @@ "@codemirror/lang-markdown": "^6.3.1", "@codemirror/lang-python": "^6.1.6", "@codemirror/lang-sass": "^6.0.2", + "@codemirror/lang-vue": "^0.1.3", "@codemirror/lang-wast": "^6.0.2", "@codemirror/language": "^6.10.6", "@codemirror/search": "^6.5.8",