lsp: Use project-local settings if available (#17753)
Release Notes: - Changed built-in language support (Rust, Go, C, YAML, ...) to lookup language-server specific settings locally in project directory first before falling back to global value. --------- Co-authored-by: Bennet <bennet@zed.dev>
This commit is contained in:
parent
092f29d394
commit
9db68ee6ae
9 changed files with 47 additions and 70 deletions
|
@ -5,10 +5,9 @@ use gpui::{AppContext, AsyncAppContext, Task};
|
|||
use http_client::github::latest_github_release;
|
||||
pub use language::*;
|
||||
use lsp::LanguageServerBinary;
|
||||
use project::project_settings::{BinarySettings, ProjectSettings};
|
||||
use project::{lsp_store::language_server_settings, project_settings::BinarySettings};
|
||||
use regex::Regex;
|
||||
use serde_json::json;
|
||||
use settings::Settings;
|
||||
use smol::{fs, process};
|
||||
use std::{
|
||||
any::Any,
|
||||
|
@ -71,10 +70,7 @@ impl super::LspAdapter for GoLspAdapter {
|
|||
cx: &AsyncAppContext,
|
||||
) -> Option<LanguageServerBinary> {
|
||||
let configured_binary = cx.update(|cx| {
|
||||
ProjectSettings::get_global(cx)
|
||||
.lsp
|
||||
.get(Self::SERVER_NAME)
|
||||
.and_then(|s| s.binary.clone())
|
||||
language_server_settings(delegate, Self::SERVER_NAME, cx).and_then(|s| s.binary.clone())
|
||||
});
|
||||
|
||||
match configured_binary {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue