mirror of
https://github.com/denoland/deno.git
synced 2025-07-24 05:35:33 +00:00
fix(lsp): restart TS language service when caching dependencies (#14979)
This commit is contained in:
parent
440250c054
commit
681bb49d0d
4 changed files with 31 additions and 3 deletions
|
@ -2814,9 +2814,16 @@ impl Inner {
|
|||
self.client.show_message(MessageType::WARNING, err).await;
|
||||
}
|
||||
|
||||
// now that we have dependencies loaded, we need to re-analyze them and
|
||||
// invalidate some diagnostics
|
||||
self.diagnostics_server.invalidate(&[referrer]);
|
||||
// Now that we have dependencies loaded, we need to re-analyze all the files.
|
||||
// For that we're invalidating all the existing diagnostics and restarting
|
||||
// the language server for TypeScript (as it might hold to some stale
|
||||
// documents).
|
||||
self.diagnostics_server.invalidate_all();
|
||||
let _: bool = self
|
||||
.ts_server
|
||||
.request(self.snapshot(), tsc::RequestMethod::Restart)
|
||||
.await
|
||||
.unwrap();
|
||||
self.send_diagnostics_update();
|
||||
self.send_testing_update();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue