I had the same issue… and I think the line of code you referenced is recently committed to master but is still unreleased on the VSCode extension site. I tried cloning master and building/installing the .vsix file myself but for some reason it still didn’t work. Maybe the issue relates to recent capitalization changes in the file type (Eex vs EEx).
After wasting some time I ended up punting and just changing the VSCode file type (lower right hand corner of window) to HTML manually when editing tailwind classes which is annoying but does work.
git clone https://github.com/reducio/vscode-html-css/tree/add-html-eex
npm install
vsce package
# deps may be need, if you need hack this code
npm install -g typescript
npm install -g yo generator-code
npm install -g vsce
npm i -g @zeit/ncc
So, after run vsce package you get file vscode-html-css-0.2.3.vsix in root project folder.
Then you need install extension manually:
Don’t forget about settings of extension.
In settings.json add:
This also works for .leex files. But I observe that on MacOS the extension works through time, I will look for a problem. I tested extension only on WSL (Windows Subsystem for Linux)
So, I found problem, Tailwind CSS loaded only through a class call at .html file, this must be do once, after that css classes will be available in all .html.eex and .html.leex files.
For example:
Call any class in your assets/css/index.html (it’s kludge).
You get all Tailwind CSS classes in your .html.eex and .html.leex files.
I read api docs for VSCode extension and think there is a solution, just need time.
The Language Server Protocol remote protocol is simply not called when opened .html.eex and .html.leex, only when opened .html (and other already a implemented files extensions).
Hmm, not sure if I am understanding the kludge correctly. I created an assets/css/index.html file with a div that references a class defined in app.css and some Tailwind classes, but still IntelliSense isn’t working in .leex files. It works in .eex files though.
If we use the HTML CSS Support extension that we need use HTML (EEx), not HTML (Eex).
The HTML CSS Support extension don’t support HTML (Eex), only HTML (EEx).
If do you mean Tailwind CSS IntelliSense, that extension work incorrectly. Namely, the vscode language server is unavailable there. Author a long time not update repo. There is a few committe for repair the extension, but their is still don’t merged.
Your update to the HTML CSS Support extension worked for me. I can now use the Tailwind CSS IntelliSense extension with both EEX and LEEX files. Thanks a bunch!
Note, I still need to have an index.html that references classes in the app.css and I need to open that file in vscode before Tailwind IntelliSense will start working with leex files. Kludgey, but much better than changing file extensions.