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

Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
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
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
fireproofsocks
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
vac
Hi, I’m quite new in Elixir and I’m trying to format a string to a PEM format. I have the certificate value like MIIDBTCCAe2...... and I...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
ycv005
I have followed this StackOverflow post to install the specific version of Erlang. And When I am running mix ecto.setup then getting fol...
New
nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
script
If I have a string “1000 cfu/ml” . I want to remove the characters and / and space . So the string is like this "1000" What is the ...
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" =&gt; #BSON.ObjectId&lt;58eb1a7a9ad169198c3dXXXX&gt;, "email" =&gt; ...
New

Other popular topics Top

vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
985 43487 311
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID&lt;0.412.0&gt; terminating ** (Postgrex.Error) FATAL...
New
chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 31013 112
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 43757 214
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
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
boundedvariable
I am going through the kafka architecture. All the features what the kafka is providing are already in Erlang. I would like hear your opi...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement