merrickluo / lsp-tailwindcss

the lsp-mode client for tailwindcss
GNU General Public License v3.0
180 stars 21 forks source link

How to setup with elixir .heex file? #26

Closed RobinBeekhof closed 2 years ago

RobinBeekhof commented 2 years ago

Hi,

I'm trying to configure lsp-tailwindcss for .heex files in Doom emacs. I have done the setup as you described and added to my config.el:

(use-package! lsp-tailwindcss :init (setq! lsp-tailwindcss-add-on-mode t)) (add-to-list 'lsp-language-id-configuration '(".*\\.heex$" . "html"))

both html-ls and tailwind-ls seem to start fine LSP :: Connected to [html-ls:29522/starting][tailwindcss:29523/starting]. LSP :: tailwindcss:29523 initialized successfully in folders: (/****) LSP :: html-ls:29522 initialized successfully in folders: (/****)

However, It is not really working. For example, when editing the .heex file, I'm not getting any tailwind suggestions.

image

I don't know what I'm doing wrong. I hope somebody can help :)

merrickluo commented 2 years ago

I'm not sure about heex, but it did work for me in leex files. The lsp log indicates that servers are starting, but might not start correctly, can you try

RobinBeekhof commented 2 years ago

image

This is what I get when running M-x lsp-describe-session. I guess red means it is off? How can I restart it?

merrickluo commented 2 years ago

Red is fine, it looks normal to me. does html-ls work?

RobinBeekhof commented 2 years ago

Yes, it's strange... HTML-ls seems to work fine

image

merrickluo commented 2 years ago

it might be a project-specific problem then, can you try lsp-toggle-trace-io and then lsp-workspace-show-log to see if any error is reported by the tailwindcss server?

RobinBeekhof commented 2 years ago

yes that worked! With lsp-toggle-trace-io and then lsp-workspace-show-log I found a mistake in my project setup... Now It works like a charm! Thanks! I will close this issue