Skip to content

Commit

Permalink
Add Svelte Language to CodeMirror
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianmroz authored Aug 4, 2024
1 parent cc50ad4 commit aaeb47a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/components/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
"@lezer/highlight": "^1.2.0",
"@nanostores/react": "0.7.2",
"@radix-ui/react-accordion": "^1.2.0",
"@replit/codemirror-lang-svelte": "^6.0.0",
"@tutorialkit/runtime": "workspace:*",
"@tutorialkit/theme": "workspace:*",
"@webcontainer/api": "1.2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,13 @@ export const supportedLanguages = [
return import('@codemirror/lang-wast').then((module) => module.wast());
},
}),
LanguageDescription.of({
name: 'Svelte',
extensions: ['svelte'],
async load() {
return import('@replit/codemirror-lang-svelte').then((module) => module.svelte());
},
}),
];

export async function getLanguage(fileName: string) {
Expand Down

0 comments on commit aaeb47a

Please sign in to comment.