@@ -132,7 +132,7 @@ connection.onInitialized(() => {
132
132
} ) ;
133
133
134
134
documents . onDidChangeContent ( async event => {
135
- connection . console . info ( `Changed : ${ event . document . uri } ` ) ;
135
+ connection . console . info ( `Compiling : ${ event . document . uri } ` ) ;
136
136
resetState ( ) ;
137
137
if ( SUPPORTED_LANGUAGE_IDS . has ( event . document . languageId ) ) {
138
138
const text = event . document . getText ( ) ;
@@ -143,8 +143,11 @@ documents.onDidChangeContent(async event => {
143
143
options : compilerOptions ,
144
144
} ) ;
145
145
} catch ( err ) {
146
+ connection . console . error ( 'Failed to compile' ) ;
146
147
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 ) ) ;
148
151
}
149
152
}
150
153
}
@@ -192,7 +195,6 @@ connection.onCodeLensResolve(lens => {
192
195
} ) ;
193
196
194
197
connection . onCodeAction ( params => {
195
- connection . console . log ( 'onCodeAction' ) ;
196
198
const codeActions : Array < CodeAction > = [ ] ;
197
199
for ( const codeActionEvent of codeActionEvents ) {
198
200
if (
@@ -242,6 +244,7 @@ connection.onRequest(AutoDepsDecorationsRequest.type, async params => {
242
244
} ) ;
243
245
244
246
function resetState ( ) {
247
+ connection . console . debug ( 'Clearing state' ) ;
245
248
compiledFns . clear ( ) ;
246
249
autoDepsDecorations = [ ] ;
247
250
codeActionEvents = [ ] ;
0 commit comments