Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

tailwind: Allow configuring the `rootFontSize` (#20500)

Thorsten Ball9e7afe870a6f
diff --git a/crates/languages/src/tailwind.rs b/crates/languages/src/tailwind.rs
index f1b5b87a2c2..e2ced0f67f3 100644
--- a/crates/languages/src/tailwind.rs
+++ b/crates/languages/src/tailwind.rs
@@ -114,31 +114,19 @@ impl LspAdapter for TailwindLspAdapter {
_: Arc<dyn LanguageToolchainStore>,
cx: &mut AsyncAppContext,
) -> Result<Value> {
- let tailwind_user_settings = cx.update(|cx| {
+ let mut tailwind_user_settings = cx.update(|cx| {
language_server_settings(delegate.as_ref(), &Self::SERVER_NAME, cx)
.and_then(|s| s.settings.clone())
.unwrap_or_default()
})?;
- let mut configuration = json!({
- "tailwindCSS": {
- "emmetCompletions": true,
- }
- });
-
- if let Some(experimental) = tailwind_user_settings.get("experimental").cloned() {
- configuration["tailwindCSS"]["experimental"] = experimental;
- }
-
- if let Some(class_attributes) = tailwind_user_settings.get("classAttributes").cloned() {
- configuration["tailwindCSS"]["classAttributes"] = class_attributes;
- }
-
- if let Some(include_languages) = tailwind_user_settings.get("includeLanguages").cloned() {
- configuration["tailwindCSS"]["includeLanguages"] = include_languages;
+ if tailwind_user_settings.get("emmetCompletions").is_none() {
+ tailwind_user_settings["emmetCompletions"] = Value::Bool(true);
}
- Ok(configuration)
+ Ok(json!({
+ "tailwindCSS": tailwind_user_settings,
+ }))
}
fn language_ids(&self) -> HashMap<String, String> {