@@ -132,7 +132,7 @@ connection.onInitialized(() => {
132132} ) ;
133133
134134documents . onDidChangeContent ( async event => {
135- connection . console . info ( `Changed : ${ event . document . uri } ` ) ;
135+ connection . console . info ( `Compiling : ${ event . document . uri } ` ) ;
136136 resetState ( ) ;
137137 if ( SUPPORTED_LANGUAGE_IDS . has ( event . document . languageId ) ) {
138138 const text = event . document . getText ( ) ;
@@ -143,8 +143,11 @@ documents.onDidChangeContent(async event => {
143143 options : compilerOptions ,
144144 } ) ;
145145 } catch ( err ) {
146+ connection . console . error ( 'Failed to compile' ) ;
146147 if ( err instanceof Error ) {
147- connection . console . error ( err . stack ?? '' ) ;
148+ connection . console . error ( err . stack ?? err . message ) ;
149+ } else {
150+ connection . console . error ( JSON . stringify ( err , null , 2 ) ) ;
148151 }
149152 }
150153 }
@@ -192,7 +195,6 @@ connection.onCodeLensResolve(lens => {
192195} ) ;
193196
194197connection . onCodeAction ( params => {
195- connection . console . log ( 'onCodeAction' ) ;
196198 const codeActions : Array < CodeAction > = [ ] ;
197199 for ( const codeActionEvent of codeActionEvents ) {
198200 if (
@@ -242,6 +244,7 @@ connection.onRequest(AutoDepsDecorationsRequest.type, async params => {
242244} ) ;
243245
244246function resetState ( ) {
247+ connection . console . debug ( 'Clearing state' ) ;
245248 compiledFns . clear ( ) ;
246249 autoDepsDecorations = [ ] ;
247250 codeActionEvents = [ ] ;
0 commit comments