File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ const stopWatchTypesLoading = whenever(
97
97
onMounted (async () => {
98
98
// Lazy load monaco, so it will be bundled in async chunk
99
99
const { default : setup } = await import (' ../setup/monaco' )
100
- const { ata, monaco } = await setup ()
100
+ const { ata, monaco, editorOptions } = await setup ()
101
101
const model = monaco .editor .createModel (code .value , lang , monaco .Uri .parse (` file:///${makeId ()}.${ext } ` ))
102
102
model .onDidChangeContent (() => code .value = model .getValue ())
103
103
const commonOptions = {
@@ -114,6 +114,7 @@ onMounted(async () => {
114
114
fontSize: 11.5 ,
115
115
fontFamily: ' var(--slidev-code-font-family)' ,
116
116
scrollBeyondLastLine: false ,
117
+ ... editorOptions ,
117
118
... props .editorOptions ,
118
119
} satisfies monaco .editor .IStandaloneEditorConstructionOptions & monaco .editor .IDiffEditorConstructionOptions
119
120
Original file line number Diff line number Diff line change @@ -95,10 +95,10 @@ const setup = createSingletonPromise(async () => {
95
95
const { shiki, themes, shikiToMonaco } = await import ( '#slidev/shiki' )
96
96
const highlighter = await shiki
97
97
98
- const setupReturn : MonacoSetupReturn = { }
98
+ const editorOptions : MonacoSetupReturn [ 'editorOptions' ] & object = { }
99
99
for ( const setup of setups ) {
100
100
const result = await setup ( monaco )
101
- Object . assign ( setupReturn , result )
101
+ Object . assign ( editorOptions , result ?. editorOptions )
102
102
}
103
103
104
104
// Use Shiki to highlight Monaco
@@ -117,7 +117,7 @@ const setup = createSingletonPromise(async () => {
117
117
return {
118
118
monaco,
119
119
ata,
120
- ... setupReturn ,
120
+ editorOptions ,
121
121
}
122
122
} )
123
123
You can’t perform that action at this time.
0 commit comments