perf(lsp): lazily start the ts server (#28392)

This commit is contained in:
Nayeem Rahman 2025-03-06 18:05:25 +00:00 committed by GitHub
parent e579440170
commit 0ef3f6ba88
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 86 additions and 60 deletions

View file

@ -11488,13 +11488,11 @@ fn lsp_performance() {
"lsp.update_diagnostics_ts",
"lsp.update_global_cache",
"tsc.host.$getDiagnostics",
"tsc.host.$getSupportedCodeFixes",
"tsc.host.getQuickInfoAtPosition",
"tsc.op.op_is_node_file",
"tsc.op.op_load",
"tsc.op.op_script_names",
"tsc.request.$getDiagnostics",
"tsc.request.$getSupportedCodeFixes",
"tsc.request.getQuickInfoAtPosition",
]
);
@ -15135,6 +15133,7 @@ fn lsp_deno_json_scopes_file_rename_import_edits() {
);
let mut client = context.new_lsp_command().build();
client.initialize_default();
client.did_open_file(&file1);
let res = client.write_request(
"workspace/willRenameFiles",
json!({
@ -15395,6 +15394,7 @@ fn lsp_deno_json_scopes_search_symbol() {
);
let mut client = context.new_lsp_command().build();
client.initialize_default();
client.did_open_file(&file1);
let res =
client.write_request("workspace/symbol", json!({ "query": "someSymbol" }));
assert_eq!(