Any Helix users having issues with Tailwind Completion in .heex files?

I’ve been using and loving Helix for the past month, and it’s been working great for PHP, and it mostly works great for Elixir. However, I for the life of me, can’t get TailwindCSS completion in .heex templates, and i’m not sure why.

I know the tailwind-ls works, as it works in plain HTML and PHP files fine. And I know my languages.toml file is handling heex files, because it seems to be handling elixir-ls and html just fine. But not tailwind. What am I missing here?

Here is my hx --health heex

Configured language servers:
  ✓ elixir-ls: /run/current-system/sw/bin/elixir-ls
  ✓ tailwindcss-language-server: /run/current-system/sw/bin/tailwindcss-language-server
  ✓ vscode-html-language-server: /run/current-system/sw/bin/vscode-html-language-server
Configured debug adapter: None
Highlight queries: ✓
Textobject queries: ✓
Indent queries: ✘

And here is my languages.toml file

name = "php"
language-servers = [ "intelephense", "tailwindcss-ls", "vscode-html-language-server" ]
auto-format = true

name = "html"
language-servers = [ "tailwindcss-ls", "vscode-html-language-server" ]

name = "elixir"
auto-format = true

name = "heex"
language-servers = [ "elixir-ls",  "tailwindcss-ls", "vscode-html-language-server" ]
auto-format = true

Screenshot from 2024-03-22 15-22-10
Screenshot from 2024-03-22 15-22-29
Screenshot from 2024-03-22 15-23-00

The order of the LSPs is probably the issue. Have a look here Helix editor for Elixir Development - #49 by tcoopman

Ahhhh so actually the order didn’t matter… but that link showed me that i needed the laungage Id set to “phoenix-heex”. Now it works as expected. Thanks!


1 Like