@@ -78,7 +78,7 @@ const handleEditorWillMount = (monacoInstance: typeof monaco) => {
7878 } ) ;
7979
8080 if ( monacoInstance ) {
81- registerAutocompletion ( ' concerto' , monacoInstance ) ;
81+ registerAutocompletion ( " concerto" , monacoInstance ) ;
8282 }
8383} ;
8484
@@ -113,7 +113,7 @@ export default function ConcertoEditor({ value, onChange }: ConcertoEditorProps)
113113 wordWrap : "on" ,
114114 automaticLayout : true ,
115115 scrollBeyondLastLine : false ,
116- lineNumbers : showLineNumbers ? 'on' : ' off' ,
116+ lineNumbers : showLineNumbers ? "on" : " off" ,
117117 autoClosingBrackets : "languageDefined" ,
118118 autoSurround : "languageDefined" ,
119119 bracketPairColorization : { enabled : true } ,
@@ -165,10 +165,13 @@ export default function ConcertoEditor({ value, onChange }: ConcertoEditorProps)
165165 range : new monaco . Range ( line , 1 , line , 1 ) ,
166166 options : {
167167 isWholeLine : true ,
168- className : ' errorLineHighlight' ,
168+ className : " errorLineHighlight" ,
169169 }
170170 }
171171 ] ) ;
172+ } else {
173+ monacoInstance . editor . setModelMarkers ( model , "customMarker" , [ ] ) ;
174+ decorationsCollectionRef . current ?. clear ( ) ;
172175 }
173176 } else {
174177 monacoInstance . editor . setModelMarkers ( model , "customMarker" , [ ] ) ;
0 commit comments