mkellyxp

mkellyxp

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

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

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

[[language]]
name = "elixir"
auto-format = true

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




Marked As Solved

mkellyxp

mkellyxp

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!


.

Also Liked

philipgiuliani

philipgiuliani

Setting the language-id to phoenix-heex caused issues with the LSP for me. If i had some binary pattern matches (<<>>) the language server recognized it as syntax error. Guess some confusion with HEEX files.

The solution for me was to reconfigure the LSP and include Elixir as a supported language. My config looks like this:

[language-server]
tailwindcss-ls-ex = { command = "tailwindcss-language-server", args = ["--stdio"], config = { tailwindCSS = { includeLanguages = { "elixir" = "html"}} } }

[[language]]
name = "elixir"
auto-format = true
language-servers = ["elixir-ls", "tailwindcss-ls-ex"]

[[language]]
name = "heex"
auto-format = true
language-id = "phoenix-heex"
language-servers = ["elixir-ls", "tailwindcss-ls-ex"]

Note: Installing the LSP via Brew didn’t work for me, so I installed it now globally via npm.

Where Next?

Popular in Questions Top

openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
polypush135
As many of you may have realized by now (sorry for all the posts here) I’ve been working on a db problem where I’m trying to aggregate a ...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
qwerescape
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? https://hexdocs.pm/ecto/Ecto.Repo.h...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New

Other popular topics Top

Tee
can someone please explain to me how Enum.reduce works with maps
New
itssasanka
Hi all, Trying to get some more clarity over utc_datetime and naive_datetime for Ecto: https://hexdocs.pm/ecto/Ecto.Schema.html#module-...
New
axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 45766 226
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
AstonJ
We’ve put together this wiki for Phoenix LiveView - please feel free to add any info you feel is worth including. What is Phoenix LiveV...
New

We're in Beta

About us Mission Statement