File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ function LeanMonacoComponent({options} : {options: LeanMonacoOptions}) {
1212 ; ( async ( ) => {
1313 await leanMonaco . start ( options )
1414 leanMonaco . setInfoviewElement ( infoviewRef . current ! )
15- await leanMonacoEditor . start ( codeviewRef . current ! , `/project/test${ Math . random ( ) } .lean` , '#check Nat' )
15+ await leanMonacoEditor . start ( codeviewRef . current ! , `/project/test.lean` , '#check Nat' )
1616 } ) ( )
1717
1818 return ( ) => {
Original file line number Diff line number Diff line change @@ -79,14 +79,13 @@ export class IFrameInfoWebviewFactory implements InfoWebviewFactory {
7979
8080 private updateCssVars ( ) {
8181 const theme = this . themeService . getColorTheme ( ) ;
82- const vscodeColors = ( ( colorUtils as any ) . getColorRegistry ( ) . getColors ( ) as Array < { id :string } > ) . reduce < string > ( ( colors , entry ) => {
82+ const documentStyle = this . iframe . contentDocument ?. documentElement . style ;
83+ for ( const entry of ( ( colorUtils as any ) . getColorRegistry ( ) . getColors ( ) as Array < { id :string } > ) ) {
8384 const color = theme . getColor ( entry . id ) ;
8485 if ( color ) {
85- colors = colors + '--vscode-' + entry . id . replace ( '.' , '-' ) + ': ' + color . toString ( ) + "; " ;
86+ documentStyle ?. setProperty ( '--vscode-' + entry . id . replace ( '.' , '-' ) , color . toString ( ) ) ;
8687 }
87- return colors
88- } , '' ) ;
89- this . iframe . contentDocument ?. documentElement . setAttribute ( 'style' , vscodeColors )
88+ }
9089 this . iframe . contentDocument ?. documentElement . setAttribute ( 'class' , this . apiThemeClassName ( theme ) )
9190 }
9291
Original file line number Diff line number Diff line change @@ -200,6 +200,7 @@ export class LeanMonaco {
200200 "configuration" : "./language-configuration.json"
201201 }
202202 ] ,
203+ colors : packageJson . contributes . colors as any ,
203204 "grammars" : [
204205 {
205206 "language" : "lean4" ,
You can’t perform that action at this time.
0 commit comments