Whoops (#3146)

Julia created

Whoops, this is what I get for working past-midnight lol, I never pushed
the last commit for https://github.com/zed-industries/zed/pull/3141 so
this PR remedies that

Release Notes:
- NA

Change summary

crates/zed/src/languages.rs              | 12 ++++++++----
crates/zed/src/languages/erb/config.toml |  1 +
crates/zed/src/languages/php/config.toml |  1 +
crates/zed/src/languages/tailwind.rs     | 23 +++++++++++------------
4 files changed, 21 insertions(+), 16 deletions(-)

Detailed changes

crates/zed/src/languages.rs 🔗

@@ -173,7 +173,10 @@ pub fn init(
     language(
         "erb",
         tree_sitter_embedded_template::language(),
-        vec![Arc::new(ruby::RubyLanguageServer)],
+        vec![
+            Arc::new(ruby::RubyLanguageServer),
+            Arc::new(tailwind::TailwindLspAdapter::new(node_runtime.clone())),
+        ],
     );
     language("scheme", tree_sitter_scheme::language(), vec![]);
     language("racket", tree_sitter_racket::language(), vec![]);
@@ -198,9 +201,10 @@ pub fn init(
     language(
         "php",
         tree_sitter_php::language(),
-        vec![Arc::new(php::IntelephenseLspAdapter::new(
-            node_runtime.clone(),
-        ))],
+        vec![
+            Arc::new(php::IntelephenseLspAdapter::new(node_runtime.clone())),
+            Arc::new(tailwind::TailwindLspAdapter::new(node_runtime.clone())),
+        ],
     );
 
     language("elm", tree_sitter_elm::language(), vec![]);

crates/zed/src/languages/erb/config.toml 🔗

@@ -5,3 +5,4 @@ brackets = [
     { start = "<", end = ">", close = true, newline = true },
 ]
 block_comment = ["<%#", "%>"]
+scope_opt_in_language_servers = ["tailwindcss-language-server"]

crates/zed/src/languages/tailwind.rs 🔗

@@ -117,18 +117,17 @@ impl LspAdapter for TailwindLspAdapter {
     }
 
     async fn language_ids(&self) -> HashMap<String, String> {
-        HashMap::from_iter(
-            [
-                ("HTML".to_string(), "html".to_string()),
-                ("CSS".to_string(), "css".to_string()),
-                ("JavaScript".to_string(), "javascript".to_string()),
-                ("TSX".to_string(), "typescriptreact".to_string()),
-                ("Svelte".to_string(), "svelte".to_string()),
-                ("Elixir".to_string(), "phoenix-heex".to_string()),
-                ("HEEX".to_string(), "phoenix-heex".to_string()),
-            ]
-            .into_iter(),
-        )
+        HashMap::from_iter([
+            ("HTML".to_string(), "html".to_string()),
+            ("CSS".to_string(), "css".to_string()),
+            ("JavaScript".to_string(), "javascript".to_string()),
+            ("TSX".to_string(), "typescriptreact".to_string()),
+            ("Svelte".to_string(), "svelte".to_string()),
+            ("Elixir".to_string(), "phoenix-heex".to_string()),
+            ("HEEX".to_string(), "phoenix-heex".to_string()),
+            ("ERB".to_string(), "erb".to_string()),
+            ("PHP".to_string(), "php".to_string()),
+        ])
     }
 
     fn enabled_formatters(&self) -> Vec<BundledFormatter> {