You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What version of Tailwind CSS IntelliSense are you using?
0.13.45
What version of Tailwind CSS are you using?
4.0.0-alpha.29
What package manager are you using?
pnpm
What operating system are you using?
macOS Sequoia 15.0.1
Current Behavior
Hi, intellisense doesn't work correctly in v4 for custom utilities even if they are specified via TypeScript config.
I read somewhere in the issues that custom classes do not provideautocompletion if they are specified via CSS API (via layer utilities {...} ), but classes that are specified via JavaScript Config API (config.plugins) should work normally.
Default Tailwind classes (theme API like flex, bg-white, space-x-1 etc.) work as expected with intellisense, but custom classes defined via TS configuration do not show up in autocomplete.
This seems to work as expected with the new CSS API in v4 though, which is awesome, didn't know that 👍🏻
I almost went through all the issues regarding v4 and stumbled upon this comment which helped me to figure how to specify custom utils with responsivnes. Also, intellisense works fine and there is no need for additional TS config (at least for now i did a quick test).
Now autocompletion works for all @theme and @utility classes as expected.
If there was some kind of temporary docs for this new API, that would be very helpful. Also, maybe it wouldn't be a bad idea to implement this for the JS API as well to make it easier to migrate from v3 to v4 version.
thecrypticace
changed the title
Intellisense not working for custom classes in the v4
TypeScript config files not working in Intellisense via @config in v4
Oct 25, 2024
What version of VS Code are you using?
1.94.0
What version of Tailwind CSS IntelliSense are you using?
0.13.45
What version of Tailwind CSS are you using?
4.0.0-alpha.29
What package manager are you using?
pnpm
What operating system are you using?
macOS Sequoia 15.0.1
Current Behavior
Hi, intellisense doesn't work correctly in
v4
for customutilities
even if they are specified via TypeScript config.I read somewhere in the issues that custom classes do not provide
autocompletion
if they are specified via CSS API (via layer utilities {...} ), but classes that are specified via JavaScript Config API (config.plugins) should work normally.Default Tailwind classes (theme API like flex, bg-white, space-x-1 etc.) work as expected with intellisense, but custom classes defined via TS configuration do not show up in autocomplete.
Here's a minimal reproduction:
So, all the additional classes that I specified in the TS config (via
theme.extend
andplugins
) do not show up in the autocompletion.Expected Behavior
The expected behavior would be that everything works fine.
The text was updated successfully, but these errors were encountered: