mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-05 18:25:57 +00:00
Use a proper settings location for yaml (#17006)
Some checks are pending
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Some checks are pending
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Release Notes: - N/A Co-authored-by: Marshall Bowers <marshall@zed.dev>
This commit is contained in:
parent
7e1eac67ef
commit
98d74f9317
1 changed files with 9 additions and 3 deletions
|
@ -3,11 +3,12 @@ use async_trait::async_trait;
|
|||
use futures::StreamExt;
|
||||
use gpui::AsyncAppContext;
|
||||
use language::{
|
||||
language_settings::all_language_settings, LanguageServerName, LspAdapter, LspAdapterDelegate,
|
||||
language_settings::AllLanguageSettings, LanguageServerName, LspAdapter, LspAdapterDelegate,
|
||||
};
|
||||
use lsp::LanguageServerBinary;
|
||||
use node_runtime::NodeRuntime;
|
||||
use serde_json::Value;
|
||||
use settings::{Settings, SettingsLocation};
|
||||
use smol::fs;
|
||||
use std::{
|
||||
any::Any,
|
||||
|
@ -95,11 +96,16 @@ impl LspAdapter for YamlLspAdapter {
|
|||
|
||||
async fn workspace_configuration(
|
||||
self: Arc<Self>,
|
||||
_: &Arc<dyn LspAdapterDelegate>,
|
||||
delegate: &Arc<dyn LspAdapterDelegate>,
|
||||
cx: &mut AsyncAppContext,
|
||||
) -> Result<Value> {
|
||||
let location = SettingsLocation {
|
||||
worktree_id: delegate.worktree_id() as usize,
|
||||
path: delegate.worktree_root_path(),
|
||||
};
|
||||
|
||||
let tab_size = cx.update(|cx| {
|
||||
all_language_settings(None, cx)
|
||||
AllLanguageSettings::get(Some(location), cx)
|
||||
.language(Some("YAML"))
|
||||
.tab_size
|
||||
})?;
|
||||
|
|
Loading…
Reference in a new issue