File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -1436,7 +1436,20 @@ async function onMessage(msg: p.Message) {
14361436 params . textDocument . uri as utils . FileURI ,
14371437 params . textDocument . text ,
14381438 ) ;
1439- await sendUpdatedDiagnostics ( ) ;
1439+
1440+ if ( config . extensionConfiguration . incrementalTypechecking ?. enable ) {
1441+ // We run incremental typechecking to get the most accurate results
1442+ // the current file may have deviated from the last compilation.
1443+ updateOpenedFile (
1444+ params . textDocument . uri as utils . FileURI ,
1445+ params . textDocument . text ,
1446+ ) ;
1447+ } else {
1448+ // Check the .compiler.log file for diagnostics
1449+ // This could be stale data of course.
1450+ await sendUpdatedDiagnostics ( ) ;
1451+ }
1452+
14401453 await updateDiagnosticSyntax (
14411454 params . textDocument . uri as utils . FileURI ,
14421455 params . textDocument . text ,
You can’t perform that action at this time.
0 commit comments