File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ const setup = createSingletonPromise(async () => {
92
92
monaco . languages . register ( { id : 'typescript' } )
93
93
monaco . languages . register ( { id : 'javascript' } )
94
94
95
- const { shiki, themes, shikiToMonaco } = await import ( '#slidev/shiki' )
95
+ const { shiki, langs , themes, shikiToMonaco } = await import ( '#slidev/shiki' )
96
96
const highlighter = await shiki
97
97
98
98
const editorOptions : MonacoSetupReturn [ 'editorOptions' ] & object = { }
@@ -113,6 +113,10 @@ const setup = createSingletonPromise(async () => {
113
113
: themes . light || 'vitesse-light' )
114
114
} )
115
115
}
116
+ // Register all languages, otherwise Monaco will not highlight them
117
+ for ( const lang of langs ) {
118
+ monaco . languages . register ( { id : lang } )
119
+ }
116
120
117
121
return {
118
122
monaco,
You can’t perform that action at this time.
0 commit comments