LspStore: move language_server_ids to local state too (#21786)

Attempt to further clarify what state is present in which mode

Release Notes:

- N/A
This commit is contained in:
Conrad Irwin 2024-12-10 00:15:06 -07:00 committed by GitHub
parent 48eed7499f
commit 3c053c7bc4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 280 additions and 238 deletions

View file

@ -11879,7 +11879,10 @@ impl Editor {
let buffer = buffer.read(cx);
let language = buffer.language()?;
if project.is_local()
&& project.language_servers_for_buffer(buffer, cx).count() == 0
&& project
.language_servers_for_local_buffer(buffer, cx)
.count()
== 0
{
None
} else {
@ -13393,7 +13396,7 @@ impl SemanticsProvider for Model<Project> {
fn supports_inlay_hints(&self, buffer: &Model<Buffer>, cx: &AppContext) -> bool {
// TODO: make this work for remote projects
self.read(cx)
.language_servers_for_buffer(buffer.read(cx), cx)
.language_servers_for_local_buffer(buffer.read(cx), cx)
.any(
|(_, server)| match server.capabilities().inlay_hint_provider {
Some(lsp::OneOf::Left(enabled)) => enabled,