mirror of
https://github.com/denoland/deno.git
synced 2025-08-03 10:33:54 +00:00
perf(lsp): only store parsed sources for open documents (#23454)
This commit is contained in:
parent
472a370640
commit
79e6751cf7
8 changed files with 199 additions and 118 deletions
|
@ -404,8 +404,11 @@ impl LanguageServer {
|
|||
let inner = self.0.read().await;
|
||||
if let Some(testing_server) = &inner.maybe_testing_server {
|
||||
match params.map(serde_json::from_value) {
|
||||
Some(Ok(params)) => testing_server
|
||||
.run_request(params, inner.config.workspace_settings().clone()),
|
||||
Some(Ok(params)) => {
|
||||
testing_server
|
||||
.run_request(params, inner.config.workspace_settings().clone())
|
||||
.await
|
||||
}
|
||||
Some(Err(err)) => Err(LspError::invalid_params(err.to_string())),
|
||||
None => Err(LspError::invalid_params("Missing parameters")),
|
||||
}
|
||||
|
@ -972,6 +975,8 @@ impl Inner {
|
|||
self.config.update_capabilities(¶ms.capabilities);
|
||||
}
|
||||
|
||||
self.documents.initialize(&self.config);
|
||||
|
||||
if let Err(e) = self
|
||||
.ts_server
|
||||
.start(self.config.internal_inspect().to_address())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue