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}) {
12
12
; ( async ( ) => {
13
13
await leanMonaco . start ( options )
14
14
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' )
16
16
} ) ( )
17
17
18
18
return ( ) => {
Original file line number Diff line number Diff line change @@ -79,14 +79,13 @@ export class IFrameInfoWebviewFactory implements InfoWebviewFactory {
79
79
80
80
private updateCssVars ( ) {
81
81
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 } > ) ) {
83
84
const color = theme . getColor ( entry . id ) ;
84
85
if ( color ) {
85
- colors = colors + '--vscode-' + entry . id . replace ( '.' , '-' ) + ': ' + color . toString ( ) + "; " ;
86
+ documentStyle ?. setProperty ( '--vscode-' + entry . id . replace ( '.' , '-' ) , color . toString ( ) ) ;
86
87
}
87
- return colors
88
- } , '' ) ;
89
- this . iframe . contentDocument ?. documentElement . setAttribute ( 'style' , vscodeColors )
88
+ }
90
89
this . iframe . contentDocument ?. documentElement . setAttribute ( 'class' , this . apiThemeClassName ( theme ) )
91
90
}
92
91
Original file line number Diff line number Diff line change @@ -200,6 +200,7 @@ export class LeanMonaco {
200
200
"configuration" : "./language-configuration.json"
201
201
}
202
202
] ,
203
+ colors : packageJson . contributes . colors as any ,
203
204
"grammars" : [
204
205
{
205
206
"language" : "lean4" ,
You can’t perform that action at this time.
0 commit comments