Provide editor.tabSize
in workspace configuration for YAML
This fixes a bug that caused the hover popover to display lots of ` ` occurrences.
This commit is contained in:
parent
88e664bfd9
commit
f5a4c6a7c1
1 changed files with 21 additions and 5 deletions
|
@ -1,12 +1,13 @@
|
||||||
use std::{any::Any, path::PathBuf, sync::Arc};
|
|
||||||
|
|
||||||
use anyhow::{anyhow, Context, Result};
|
use anyhow::{anyhow, Context, Result};
|
||||||
use async_trait::async_trait;
|
use async_trait::async_trait;
|
||||||
use client::http::HttpClient;
|
use client::http::HttpClient;
|
||||||
use futures::StreamExt;
|
use futures::{future::BoxFuture, FutureExt, StreamExt};
|
||||||
use smol::fs;
|
use gpui::MutableAppContext;
|
||||||
|
|
||||||
use language::{LanguageServerName, LspAdapter};
|
use language::{LanguageServerName, LspAdapter};
|
||||||
|
use serde_json::Value;
|
||||||
|
use settings::Settings;
|
||||||
|
use smol::fs;
|
||||||
|
use std::{any::Any, future, path::PathBuf, sync::Arc};
|
||||||
use util::ResultExt;
|
use util::ResultExt;
|
||||||
|
|
||||||
use super::installation::{npm_install_packages, npm_package_latest_version};
|
use super::installation::{npm_install_packages, npm_package_latest_version};
|
||||||
|
@ -90,4 +91,19 @@ impl LspAdapter for YamlLspAdapter {
|
||||||
.await
|
.await
|
||||||
.log_err()
|
.log_err()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn workspace_configuration(
|
||||||
|
&self,
|
||||||
|
cx: &mut MutableAppContext,
|
||||||
|
) -> Option<BoxFuture<'static, Value>> {
|
||||||
|
let settings = cx.global::<Settings>();
|
||||||
|
Some(
|
||||||
|
future::ready(serde_json::json!({
|
||||||
|
"[yaml]": {
|
||||||
|
"editor.tabSize": settings.tab_size(Some("YAML"))
|
||||||
|
}
|
||||||
|
}))
|
||||||
|
.boxed(),
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue