Skip to content

Conversation

patryk-s
Copy link
Contributor

@patryk-s patryk-s commented Sep 4, 2025

In neovim, the newer Phoenix HTML templates are identified as heex files. Additionally, there can be HTML code within .ex files (via ~H""), which both neovim and VSCode identify as elixir.

@thecrypticace
Copy link
Contributor

I think treating Elixir as HTML might be a bit finicky (ideally we'd detect the code inside ~H"…") but will handle that later if it proves to be an issue.

@thecrypticace thecrypticace merged commit dbdc14f into tailwindlabs:main Sep 4, 2025
12 checks passed
@thecrypticace
Copy link
Contributor

Will be updated in the next release of the language server.

@Thr3x
Copy link

Thr3x commented Sep 5, 2025

Does this mean Elixir wasn't even supported? I've been pulling my hair out trying to get intellisense to work with tailwind v4 in elixir files.... Elixir files worked just fine being detected as HTML with Tailwind v3. @thecrypticace

@victormilk
Copy link

Hi! Could you let me know the planned release date for the next version that contains these changes?

@thecrypticace
Copy link
Contributor

Does this mean Elixir wasn't even supported? I've been pulling my hair out trying to get intellisense to work with tailwind v4 in elixir files.... Elixir files worked just fine being detected as HTML with Tailwind v3. @thecrypticace

It was but it depends on the language ID sent to our language server: https://github.com/tailwindlabs/tailwindcss-intellisense/blame/ede2c7d0fb2f0edc8f2cd17bd8c0ca0da1451e35/packages/tailwindcss-language-service/src/util/languages.ts#L21-L23

Note: language IDs are not file extensions. They're independent.

Those Elixir languages have been there for a little over 5 years — if the language ID doesn't match or otherwise changed to something else then it won't work.

You can always work around this by using our tailwindCSS.includeLanguages option which can map arbitrary language IDs to one we recognize.

@thecrypticace
Copy link
Contributor

Hi! Could you let me know the planned release date for the next version that contains these changes?

I'll see if I can get to it tomorrow. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants