summaryrefslogtreecommitdiff
path: root/cli/lsp/tsc.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2022-06-27 19:43:43 +0200
committerGitHub <noreply@github.com>2022-06-27 19:43:43 +0200
commit681bb49d0df0865a6564741544869a57aab56bb1 (patch)
tree142bae4a04e696d16490814f4c36116bc85adf5a /cli/lsp/tsc.rs
parent440250c05498e3bfc8682e91476dc6e0e3a79429 (diff)
fix(lsp): restart TS language service when caching dependencies (#14979)
Diffstat (limited to 'cli/lsp/tsc.rs')
-rw-r--r--cli/lsp/tsc.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/cli/lsp/tsc.rs b/cli/lsp/tsc.rs
index 2a5bdc2d8..76e428b2f 100644
--- a/cli/lsp/tsc.rs
+++ b/cli/lsp/tsc.rs
@@ -2871,6 +2871,9 @@ pub enum RequestMethod {
ProvideCallHierarchyIncomingCalls((ModuleSpecifier, u32)),
/// Resolve outgoing call hierarchy items for a specific position.
ProvideCallHierarchyOutgoingCalls((ModuleSpecifier, u32)),
+
+ // Special request, used only internally by the LSP
+ Restart,
}
impl RequestMethod {
@@ -3084,6 +3087,10 @@ impl RequestMethod {
"position": position
})
}
+ RequestMethod::Restart => json!({
+ "id": id,
+ "method": "restart",
+ }),
}
}
}