Start to split out initialization and registration (#21787)
Still TODO: * [x] Factor out `start_language_server` so we can call it on register (instead of on detect language) * [x] Only call register in singleton editors (or when editing/go-to-definition etc. in a multibuffer?) * [x] Refcount on register so we can unregister when no buffer remain * [ ] (maybe) Stop language servers that are no longer needed after some time Release Notes: - Fixed language servers starting when doing project search - Fixed high CPU usage when ignoring warnings in the diagnostics view --------- Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Co-authored-by: Cole <cole@zed.dev>
This commit is contained in:
parent
de89f8cf83
commit
13a81e454a
19 changed files with 2200 additions and 1848 deletions
|
@ -5113,9 +5113,11 @@ fn make_lsp_adapter_delegate(
|
|||
return Ok(None::<Arc<dyn LspAdapterDelegate>>);
|
||||
};
|
||||
let http_client = project.client().http_client().clone();
|
||||
project.lsp_store().update(cx, |lsp_store, cx| {
|
||||
project.lsp_store().update(cx, |_, cx| {
|
||||
Ok(Some(LocalLspAdapterDelegate::new(
|
||||
lsp_store,
|
||||
project.languages().clone(),
|
||||
project.environment(),
|
||||
cx.weak_model(),
|
||||
&worktree,
|
||||
http_client,
|
||||
project.fs().clone(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue