Skip to content

Commit c73d58b

Browse files
committed
updateVSCodeOptions
1 parent 2ee4417 commit c73d58b

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/leanmonaco.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,15 +143,18 @@ export class LeanMonaco {
143143
document.fonts.add(fontFile);
144144
await fontFile.load()
145145

146-
if (this.disposed) return;
146+
this.updateVSCodeOptions(options.vscode ?? {})
147147

148-
updateUserConfiguration(JSON.stringify({
149-
"[lean4]": options.vscode
150-
}))
148+
if (this.disposed) return;
151149

152150
this.ready()
153151
}
154152

153+
updateVSCodeOptions(vsCodeOptions: { [id: string]: any }){
154+
updateUserConfiguration(JSON.stringify({
155+
"[lean4]": vsCodeOptions
156+
}))
157+
}
155158

156159
setInfoviewElement(infoviewEl: HTMLElement){
157160
if (this.iframeWebviewFactory) this.iframeWebviewFactory.setInfoviewElement(infoviewEl)

0 commit comments

Comments
 (0)