Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not getting proper intellisense suggestions after upgrading to v4 tailwind css (React+Vite project) #1156

Closed
SahilKhan30 opened this issue Jan 30, 2025 · 7 comments
Labels
question Further information is requested

Comments

@SahilKhan30
Copy link

What version of VS Code are you using?
v1.96.4

What version of Tailwind CSS IntelliSense are you using?
v0.14.2

What version of Tailwind CSS are you using?
v4.0.1

What package manager are you using?
yarn

What operating system are you using?
Ubuntu

Tailwind config
No tailwind config file (added tailwindcss() into vite.config.js as per v4 tailwind requirements)

VS Code settings
{
"files.autoSave": "onFocusChange",
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"diffEditor.ignoreTrimWhitespace": false,
"editor.tabSize": 2,
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[scss]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.minimap.renderCharacters": false,
"tabnine.experimentalAutoImports": true,
"gitlens.views.stashes.files.layout": "tree",
"scm.showHistoryGraph": false,
"git.confirmSync": false,
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"codeium.enableConfig": {
"*": true,
"properties": true
},
"tailwindCSS.experimental.configFile": null
}

Describe your issue
I am using react project with vite.
While i was using tailwind v3.4.17, i was getting all the suggestions from the intellisense, but since i upgraded to v4, the suggestions are not as relevant or not proper, as it was before.

@SahilKhan30
Copy link
Author

SahilKhan30 commented Jan 30, 2025

Image
Above image is using v3 tailwind

Image
And later image is after migrating to v4 tailwind

@thecrypticace
Copy link
Contributor

@SahilKhan30 Can you provide a reproduction please?

@thecrypticace thecrypticace added the question Further information is requested label Jan 30, 2025
@SahilKhan30
Copy link
Author

SahilKhan30 commented Jan 30, 2025

@SahilKhan30 Can you provide a reproduction please?

Was using v3 of tailwind when I was getting all the suggestions.

Migrated to v4 using following command
npx @tailwindcss/upgrade@next
Which also removed my tailwind.config.js file , as per new vite-tailwind configuration process.

Since then, the suggestions are not coming like before.

If i uninstall v4, and re-install v3 tailwind for vite, it is again working fine.

@thecrypticace
Copy link
Contributor

@SahilKhan30 So, I still need a reproduction. IntelliSense works quite differently with v4 and has to locate a CSS file on disk that represents your projects "root" css file. If there is no CSS file then it won't work. If there is one I need to see the project structure to figure out why it's not working.

@thecrypticace
Copy link
Contributor

Can you reproduce this in a project and put a repo up on GitHub for me to look at?

@jdaleyftp
Copy link

I was seeing this, but was able to get it working again by simply uninstalling and reinstalling the extension.

Just wanted to share my experience.

@SahilKhan30
Copy link
Author

I was seeing this, but was able to get it working again by simply uninstalling and reinstalling the extension.

Just wanted to share my experience.

I uninstalled and re-installed the extension, but it did not help me. Later, i re-installed the Vs Code (also cleared the vs-code user data). Re-cloned my project, and install fresh dependencies, and after that, it started working fine. Thanks.
Closing this issue now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants