@@ -524,52 +524,7 @@ const IDE = () => {
524524 editor . addCommand ( monaco . KeyMod . CtrlCmd | monaco . KeyCode . KeyS , function ( ) {
525525 handleSave ( ) ;
526526 } ) ;
527-
528- monaco . editor . defineTheme ( 'custom-dark' , {
529- base : 'vs-dark' ,
530- inherit : true ,
531- rules : [
532- { token : '' , foreground : 'D4D4D4' , background : '1E1E1E' } ,
533- { token : 'comment' , foreground : '6A9955' } ,
534- { token : 'string' , foreground : 'CE9178' } ,
535- { token : 'keyword' , foreground : '569CD6' } ,
536- { token : 'number' , foreground : 'B5CEA8' }
537- ] ,
538- colors : {
539- 'editor.background' : '#1E1E1E' ,
540- 'editorLineNumber.foreground' : '#858585' ,
541- 'editorCursor.foreground' : '#AEAFAD' ,
542- 'editor.selectionBackground' : '#264F78' ,
543- 'editor.lineHighlightBackground' : '#2A2D2E'
544- }
545- } ) ;
546-
547- monaco . editor . defineTheme ( 'custom-light' , {
548- base : 'vs' ,
549- inherit : true ,
550- rules : [
551- { token : '' , foreground : '2D2D2D' , background : 'FFFFFF' } ,
552- { token : 'comment' , foreground : '008000' } ,
553- { token : 'string' , foreground : 'A31515' } ,
554- { token : 'keyword' , foreground : '0000FF' } ,
555- { token : 'number' , foreground : '098658' }
556- ] ,
557- colors : {
558- 'editor.background' : '#FFFFFF' ,
559- 'editorLineNumber.foreground' : '#237893' ,
560- 'editorCursor.foreground' : '#000000' ,
561- 'editor.selectionBackground' : '#ADD6FF' ,
562- 'editor.lineHighlightBackground' : '#F5F5F5'
563- }
564- } ) ;
565-
566- const updateEditorTheme = ( monaco ) => {
567- if ( ! monaco && ! editorRef . current ) return ;
568- const m = monaco || window . monaco ;
569- if ( m ) { m . editor . setTheme ( isDarkMode ? 'custom-dark' : 'custom-light' ) ; }
570- } ;
571-
572- updateEditorTheme ( monaco ) ;
527+ monaco . editor . setTheme ( isDarkMode ? 'vs-dark' : 'vs' ) ;
573528
574529 setTimeout ( ( ) => {
575530 try { editorRef . current . layout ( ) ; } catch ( e ) { console . warn ( '에디터 초기 레이아웃 설정 중 오류:' , e ) ; }
@@ -881,9 +836,8 @@ const IDE = () => {
881836 if ( newIsDarkMode !== isDarkMode ) {
882837 setIsDarkMode ( newIsDarkMode ) ;
883838
884- if ( editorRef . current && monacoRef . current ) {
885- const newTheme = newIsDarkMode ? 'custom-dark' : 'custom-light' ;
886- monacoRef . current . editor . setTheme ( newTheme ) ;
839+ if ( monacoRef . current ) {
840+ monacoRef . current . editor . setTheme ( newIsDarkMode ? 'vs-dark' : 'vs' ) ;
887841 }
888842 }
889843 }
0 commit comments