From a9d02aea2fa231da8edd5f42c8bd6575f488fe0e Mon Sep 17 00:00:00 2001 From: lucasp Date: Fri, 6 Feb 2026 17:37:31 -0300 Subject: [PATCH] fix(tailwind): enable Tailwind CSS support in Angular templates This commit fixes the issue where Tailwind CSS autocomplete was not working in Angular component HTML files, only in inline templates. Changes: - Map Angular language_id to "html" instead of "angular" for LSP compatibility - Remove invalid scope_opt_in_language_servers configuration - Update README with Tailwind CSS configuration instructions The Tailwind CSS Language Server only recognizes "html" and "typescript" language IDs. By mapping Angular to "html", we enable Tailwind autocomplete in .component.html files while maintaining all Angular Language Server features. Fixes: Tailwind CSS IntelliSense in Angular template files Related: https://github.com/zed-industries/zed/issues/39507 --- README.md | 9 +++++++++ extension.toml | 2 +- languages/angular/config.toml | 1 - 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8f3434c..5a4792d 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,16 @@ To install this extension locally: }, "HTML": { "language_servers": ["angular", "..."] + }, + "Angular": { + "language_servers": ["angular", "tailwindcss-language-server", "..."] } } } ``` + +## Tailwind CSS Support + +This version includes a fix for Tailwind CSS autocomplete in Angular template files. The Angular language now correctly maps to HTML for language server communication, enabling Tailwind CSS IntelliSense to work in both `.component.html` files and inline templates. + +To enable Tailwind CSS support, add the configuration above to your `settings.json`, ensuring the Angular language includes both the `angular` and `tailwindcss-language-server` language servers. diff --git a/extension.toml b/extension.toml index 6144568..2aa2943 100644 --- a/extension.toml +++ b/extension.toml @@ -10,7 +10,7 @@ path_suffixes = ["html", "ng.html"] [language_servers.angular] name = "Angular Language Server" languages = ["TypeScript", "HTML", "Angular"] -language_ids = { "Angular" = "angular", "HTML" = "html", "TypeScript" = "typescript" } +language_ids = { "Angular" = "html", "HTML" = "html", "TypeScript" = "typescript" } command = { extension = true } [grammars.angular] diff --git a/languages/angular/config.toml b/languages/angular/config.toml index c457754..137924d 100644 --- a/languages/angular/config.toml +++ b/languages/angular/config.toml @@ -5,7 +5,6 @@ block_comment = [""] autoclose_before = ";:.,=}])>\"'" prettier_parser_name = "angular" -scope_opt_in_language_servers = ["tailwindcss-language-server"] # Define brackets for TypeScript, HTML, CSS, and SCSS with Angular specific extensions brackets = [