Skip to content

Tailwind CSS IntelliSence stopped working again #183

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

Closed
luuktimmermans opened this issue Apr 7, 2025 · 13 comments
Closed

Tailwind CSS IntelliSence stopped working again #183

luuktimmermans opened this issue Apr 7, 2025 · 13 comments
Labels
Status: Needs Reporter Feedback Type: Upstream Issues with upstream dependencies

Comments

@luuktimmermans
Copy link

Hi,

When I download the them, run npm install and npm run watch, the Tailwind IntelliSence plugin stops working. Is there a solution to this?

@gregsullivan
Copy link
Owner

Hi Luuk—thanks for posting this!

It looks like there are ongoing changes to the Tailwind CSS IntelliSense plugin that are changing how source detection works.

Just to make sure we're in the same place, I'm finding the following:

  • IntelliSense works immediately in CSS files in folders like ./tailwind/custom
  • IntelliSense does not work in PHP files in ./theme
  • Making a change to ./tailwind/tailwind-theme.css and saving it causes IntelliSense to begin working in PHP files in ./theme

Does the same happen to you?

@luuktimmermans
Copy link
Author

luuktimmermans commented Apr 7, 2025

Hi there,

Well, for me it doesn't work at all. It only works in my tailwind-editor.css file.

@gregsullivan
Copy link
Owner

Just to confirm, it doesn't work in any of the other CSS files, and it doesn't work in PHP files after saving changes to, e.g., ./tailwind/tailwind-theme.css?

Do you have any project or global settings for Tailwind CSS IntelliSense?

@gregsullivan
Copy link
Owner

I'm trying to create a repeatable process. To ensure a clean environment each time, I'm closing the VS Code window and reopening the repository. This is what I get in the output panel on load:

Locating server…
Booting server...
Setting up server…
Listening for messages…
Searching for Tailwind CSS projects in the workspace's folders.
{"tailwind":{"version":"4.1.3","features":["css-at-theme","layer:base","content-list","source-inline","source-not"],"isDefaultVersion":false},"path":"/path/to/repository/tailwind.css"}
{"tailwind":{"version":"4.1.3","features":["css-at-theme","layer:base","content-list","source-inline","source-not"],"isDefaultVersion":false},"path":"/path/to/repository/tailwind/tailwind-typography.config.js"}
{"tailwind":{"version":"4.1.3","features":["css-at-theme","layer:base","content-list","source-inline","source-not"],"isDefaultVersion":false},"path":"/path/to/repository/tailwind/tailwind-editor.css"}
{"tailwind":{"version":"4.1.3","features":["css-at-theme","layer:base","content-list","source-inline","source-not"],"isDefaultVersion":false},"path":"/path/to/repository/tailwind/tailwind-editor-extra.css"}
[Global] Creating projects: [{"folder":"/path/to/repository","config":"/path/to/repository/tailwind.css","selectors":[{"pattern":"/path/to/repository/tailwind.css","priority":0},{"pattern":"/path/to/repository/node_scripts/zip.js","priority":1},{"pattern":"/path/to/repository/LICENSE","priority":1},{"pattern":"/path/to/repository/postcss.config.mjs","priority":1},{"pattern":"/path/to/repository/.prettierignore","priority":1},{"pattern":"/path/to/repository/.editorconfig","priority":1},{"pattern":"/path/to/repository/tailwind/tailwind-editor-extra.css","priority":1},{"pattern":"/path/to/repository/tailwind/tailwind-editor.css","priority":1},{"pattern":"/path/to/repository/tailwind/custom/components/components.css","priority":1},{"pattern":"/path/to/repository/tailwind/custom/file-header.css","priority":1},{"pattern":"/path/to/repository/tailwind/custom/fonts.css","priority":1},{"pattern":"/path/to/repository/tailwind/custom/utilities.css","priority":1},{"pattern":"/path/to/repository/tailwind/custom/base.css","priority":1},{"pattern":"/path/to/repository/tailwind/tailwind-typography.config.js","priority":1},{"pattern":"/path/to/repository/tailwind/partials/header.css","priority":1},{"pattern":"/path/to/repository/tailwind/partials/footer.css","priority":1},{"pattern":"/path/to/repository/tailwind/tailwind-theme.css","priority":1},{"pattern":"/path/to/repository/README.md","priority":1},{"pattern":"/path/to/repository/prettier.config.mjs","priority":1},{"pattern":"/path/to/repository/package.json","priority":1},{"pattern":"/path/to/repository/theme/functions.php","priority":1},{"pattern":"/path/to/repository/theme/404.php","priority":1},{"pattern":"/path/to/repository/theme/inc/template-tags.php","priority":1},{"pattern":"/path/to/repository/theme/inc/template-functions.php","priority":1},{"pattern":"/path/to/repository/theme/theme.json","priority":1},{"pattern":"/path/to/repository/theme/index.php","priority":1},{"pattern":"/path/to/repository/theme/archive.php","priority":1},{"pattern":"/path/to/repository/theme/js/readme.txt","priority":1},{"pattern":"/path/to/repository/theme/comments.php","priority":1},{"pattern":"/path/to/repository/theme/search.php","priority":1},{"pattern":"/path/to/repository/theme/languages/readme.txt","priority":1},{"pattern":"/path/to/repository/theme/header.php","priority":1},{"pattern":"/path/to/repository/theme/template-parts/layout/header-content.php","priority":1},{"pattern":"/path/to/repository/theme/template-parts/layout/footer-content.php","priority":1},{"pattern":"/path/to/repository/theme/template-parts/content/content-single.php","priority":1},{"pattern":"/path/to/repository/theme/template-parts/content/content-none.php","priority":1},{"pattern":"/path/to/repository/theme/template-parts/content/content-page.php","priority":1},{"pattern":"/path/to/repository/theme/template-parts/content/content-excerpt.php","priority":1},{"pattern":"/path/to/repository/theme/template-parts/content/content.php","priority":1},{"pattern":"/path/to/repository/theme/footer.php","priority":1},{"pattern":"/path/to/repository/theme/single.php","priority":1},{"pattern":"/path/to/repository/theme/page.php","priority":1},{"pattern":"/path/to/repository/phpcs.xml.dist","priority":1},{"pattern":"/path/to/repository/javascript/script.js","priority":1},{"pattern":"/path/to/repository/javascript/block-editor.js","priority":1},{"pattern":"/path/to/repository/eslint.config.mjs","priority":1},{"pattern":"/path/to/repository/composer.json","priority":1},{"pattern":"/path/to/repository/*","priority":1},{"pattern":"/path/to/repository/javascript/**/*.{,aspx,astro,cjs,css,cts,dist,eex,erb,gjs,gts,haml,handlebars,hbs,heex,html,jade,js,json,jsx,liquid,md,mdx,mjs,mts,mustache,njk,nunjucks,php,pug,py,razor,rb,rhtml,rs,slim,svelte,tpl,ts,tsx,twig,txt,vue}","priority":1},{"pattern":"/path/to/repository/node_scripts/**/*.{,aspx,astro,cjs,css,cts,dist,eex,erb,gjs,gts,haml,handlebars,hbs,heex,html,jade,js,json,jsx,liquid,md,mdx,mjs,mts,mustache,njk,nunjucks,php,pug,py,razor,rb,rhtml,rs,slim,svelte,tpl,ts,tsx,twig,txt,vue}","priority":1},{"pattern":"/path/to/repository/tailwind/**/*.{,aspx,astro,cjs,css,cts,dist,eex,erb,gjs,gts,haml,handlebars,hbs,heex,html,jade,js,json,jsx,liquid,md,mdx,mjs,mts,mustache,njk,nunjucks,php,pug,py,razor,rb,rhtml,rs,slim,svelte,tpl,ts,tsx,twig,txt,vue}","priority":1},{"pattern":"/path/to/repository/theme/**/*.{,aspx,astro,cjs,css,cts,dist,eex,erb,gjs,gts,haml,handlebars,hbs,heex,html,jade,js,json,jsx,liquid,md,mdx,mjs,mts,mustache,njk,nunjucks,php,pug,py,razor,rb,rhtml,rs,slim,svelte,tpl,ts,tsx,twig,txt,vue}","priority":1},{"pattern":"/path/to/repository/**","priority":2}],"user":false,"tailwind":{"version":"4.1.3","features":["css-at-theme","layer:base","content-list","source-inline","source-not"],"isDefaultVersion":false}},{"folder":"/path/to/repository","config":"/path/to/repository/tailwind/tailwind-editor.css","selectors":[{"pattern":"/path/to/repository/tailwind/tailwind-editor.css","priority":0},{"pattern":"/path/to/repository/node_scripts/zip.js","priority":1},{"pattern":"/path/to/repository/LICENSE","priority":1},{"pattern":"/path/to/repository/postcss.config.mjs","priority":1},{"pattern":"/path/to/repository/tailwind.css","priority":1},{"pattern":"/path/to/repository/.prettierignore","priority":1},{"pattern":"/path/to/repository/.editorconfig","priority":1},{"pattern":"/path/to/repository/tailwind/tailwind-editor-extra.css","priority":1},{"pattern":"/path/to/repository/tailwind/custom/components/components.css","priority":1},{"pattern":"/path/to/repository/tailwind/custom/file-header.css","priority":1},{"pattern":"/path/to/repository/tailwind/custom/fonts.css","priority":1},{"pattern":"/path/to/repository/tailwind/custom/utilities.css","priority":1},{"pattern":"/path/to/repository/tailwind/custom/base.css","priority":1},{"pattern":"/path/to/repository/tailwind/tailwind-typography.config.js","priority":1},{"pattern":"/path/to/repository/tailwind/partials/header.css","priority":1},{"pattern":"/path/to/repository/tailwind/partials/footer.css","priority":1},{"pattern":"/path/to/repository/tailwind/tailwind-theme.css","priority":1},{"pattern":"/path/to/repository/README.md","priority":1},{"pattern":"/path/to/repository/prettier.config.mjs","priority":1},{"pattern":"/path/to/repository/package.json","priority":1},{"pattern":"/path/to/repository/theme/functions.php","priority":1},{"pattern":"/path/to/repository/theme/404.php","priority":1},{"pattern":"/path/to/repository/theme/inc/template-tags.php","priority":1},{"pattern":"/path/to/repository/theme/inc/template-functions.php","priority":1},{"pattern":"/path/to/repository/theme/theme.json","priority":1},{"pattern":"/path/to/repository/theme/index.php","priority":1},{"pattern":"/path/to/repository/theme/archive.php","priority":1},{"pattern":"/path/to/repository/theme/js/readme.txt","priority":1},{"pattern":"/path/to/repository/theme/comments.php","priority":1},{"pattern":"/path/to/repository/theme/search.php","priority":1},{"pattern":"/path/to/repository/theme/languages/readme.txt","priority":1},{"pattern":"/path/to/repository/theme/header.php","priority":1},{"pattern":"/path/to/repository/theme/template-parts/layout/header-content.php","priority":1},{"pattern":"/path/to/repository/theme/template-parts/layout/footer-content.php","priority":1},{"pattern":"/path/to/repository/theme/template-parts/content/content-single.php","priority":1},{"pattern":"/path/to/repository/theme/template-parts/content/content-none.php","priority":1},{"pattern":"/path/to/repository/theme/template-parts/content/content-page.php","priority":1},{"pattern":"/path/to/repository/theme/template-parts/content/content-excerpt.php","priority":1},{"pattern":"/path/to/repository/theme/template-parts/content/content.php","priority":1},{"pattern":"/path/to/repository/theme/footer.php","priority":1},{"pattern":"/path/to/repository/theme/single.php","priority":1},{"pattern":"/path/to/repository/theme/page.php","priority":1},{"pattern":"/path/to/repository/phpcs.xml.dist","priority":1},{"pattern":"/path/to/repository/javascript/script.js","priority":1},{"pattern":"/path/to/repository/javascript/block-editor.js","priority":1},{"pattern":"/path/to/repository/eslint.config.mjs","priority":1},{"pattern":"/path/to/repository/composer.json","priority":1},{"pattern":"/path/to/repository/*","priority":1},{"pattern":"/path/to/repository/javascript/**/*.{,aspx,astro,cjs,css,cts,dist,eex,erb,gjs,gts,haml,handlebars,hbs,heex,html,jade,js,json,jsx,liquid,md,mdx,mjs,mts,mustache,njk,nunjucks,php,pug,py,razor,rb,rhtml,rs,slim,svelte,tpl,ts,tsx,twig,txt,vue}","priority":1},{"pattern":"/path/to/repository/node_scripts/**/*.{,aspx,astro,cjs,css,cts,dist,eex,erb,gjs,gts,haml,handlebars,hbs,heex,html,jade,js,json,jsx,liquid,md,mdx,mjs,mts,mustache,njk,nunjucks,php,pug,py,razor,rb,rhtml,rs,slim,svelte,tpl,ts,tsx,twig,txt,vue}","priority":1},{"pattern":"/path/to/repository/tailwind/**/*.{,aspx,astro,cjs,css,cts,dist,eex,erb,gjs,gts,haml,handlebars,hbs,heex,html,jade,js,json,jsx,liquid,md,mdx,mjs,mts,mustache,njk,nunjucks,php,pug,py,razor,rb,rhtml,rs,slim,svelte,tpl,ts,tsx,twig,txt,vue}","priority":1},{"pattern":"/path/to/repository/theme/**/*.{,aspx,astro,cjs,css,cts,dist,eex,erb,gjs,gts,haml,handlebars,hbs,heex,html,jade,js,json,jsx,liquid,md,mdx,mjs,mts,mustache,njk,nunjucks,php,pug,py,razor,rb,rhtml,rs,slim,svelte,tpl,ts,tsx,twig,txt,vue}","priority":1},{"pattern":"/path/to/repository/tailwind/**","priority":2},{"pattern":"/path/to/repository/**","priority":4}],"user":false,"tailwind":{"version":"4.1.3","features":["css-at-theme","layer:base","content-list","source-inline","source-not"],"isDefaultVersion":false}},{"folder":"/path/to/repository","config":"/path/to/repository/tailwind/tailwind-editor-extra.css","selectors":[{"pattern":"/path/to/repository/tailwind/tailwind-editor-extra.css","priority":0},{"pattern":"/path/to/repository/node_scripts/zip.js","priority":1},{"pattern":"/path/to/repository/LICENSE","priority":1},{"pattern":"/path/to/repository/postcss.config.mjs","priority":1},{"pattern":"/path/to/repository/tailwind.css","priority":1},{"pattern":"/path/to/repository/.prettierignore","priority":1},{"pattern":"/path/to/repository/.editorconfig","priority":1},{"pattern":"/path/to/repository/tailwind/tailwind-editor.css","priority":1},{"pattern":"/path/to/repository/tailwind/custom/components/components.css","priority":1},{"pattern":"/path/to/repository/tailwind/custom/file-header.css","priority":1},{"pattern":"/path/to/repository/tailwind/custom/fonts.css","priority":1},{"pattern":"/path/to/repository/tailwind/custom/utilities.css","priority":1},{"pattern":"/path/to/repository/tailwind/custom/base.css","priority":1},{"pattern":"/path/to/repository/tailwind/tailwind-typography.config.js","priority":1},{"pattern":"/path/to/repository/tailwind/partials/header.css","priority":1},{"pattern":"/path/to/repository/tailwind/partials/footer.css","priority":1},{"pattern":"/path/to/repository/tailwind/tailwind-theme.css","priority":1},{"pattern":"/path/to/repository/README.md","priority":1},{"pattern":"/path/to/repository/prettier.config.mjs","priority":1},{"pattern":"/path/to/repository/package.json","priority":1},{"pattern":"/path/to/repository/theme/functions.php","priority":1},{"pattern":"/path/to/repository/theme/404.php","priority":1},{"pattern":"/path/to/repository/theme/inc/template-tags.php","priority":1},{"pattern":"/path/to/repository/theme/inc/template-functions.php","priority":1},{"pattern":"/path/to/repository/theme/theme.json","priority":1},{"pattern":"/path/to/repository/theme/index.php","priority":1},{"pattern":"/path/to/repository/theme/archive.php","priority":1},{"pattern":"/path/to/repository/theme/js/readme.txt","priority":1},{"pattern":"/path/to/repository/theme/comments.php","priority":1},{"pattern":"/path/to/repository/theme/search.php","priority":1},{"pattern":"/path/to/repository/theme/languages/readme.txt","priority":1},{"pattern":"/path/to/repository/theme/header.php","priority":1},{"pattern":"/path/to/repository/theme/template-parts/layout/header-content.php","priority":1},{"pattern":"/path/to/repository/theme/template-parts/layout/footer-content.php","priority":1},{"pattern":"/path/to/repository/theme/template-parts/content/content-single.php","priority":1},{"pattern":"/path/to/repository/theme/template-parts/content/content-none.php","priority":1},{"pattern":"/path/to/repository/theme/template-parts/content/content-page.php","priority":1},{"pattern":"/path/to/repository/theme/template-parts/content/content-excerpt.php","priority":1},{"pattern":"/path/to/repository/theme/template-parts/content/content.php","priority":1},{"pattern":"/path/to/repository/theme/footer.php","priority":1},{"pattern":"/path/to/repository/theme/single.php","priority":1},{"pattern":"/path/to/repository/theme/page.php","priority":1},{"pattern":"/path/to/repository/phpcs.xml.dist","priority":1},{"pattern":"/path/to/repository/javascript/script.js","priority":1},{"pattern":"/path/to/repository/javascript/block-editor.js","priority":1},{"pattern":"/path/to/repository/eslint.config.mjs","priority":1},{"pattern":"/path/to/repository/composer.json","priority":1},{"pattern":"/path/to/repository/*","priority":1},{"pattern":"/path/to/repository/javascript/**/*.{,aspx,astro,cjs,css,cts,dist,eex,erb,gjs,gts,haml,handlebars,hbs,heex,html,jade,js,json,jsx,liquid,md,mdx,mjs,mts,mustache,njk,nunjucks,php,pug,py,razor,rb,rhtml,rs,slim,svelte,tpl,ts,tsx,twig,txt,vue}","priority":1},{"pattern":"/path/to/repository/node_scripts/**/*.{,aspx,astro,cjs,css,cts,dist,eex,erb,gjs,gts,haml,handlebars,hbs,heex,html,jade,js,json,jsx,liquid,md,mdx,mjs,mts,mustache,njk,nunjucks,php,pug,py,razor,rb,rhtml,rs,slim,svelte,tpl,ts,tsx,twig,txt,vue}","priority":1},{"pattern":"/path/to/repository/tailwind/**/*.{,aspx,astro,cjs,css,cts,dist,eex,erb,gjs,gts,haml,handlebars,hbs,heex,html,jade,js,json,jsx,liquid,md,mdx,mjs,mts,mustache,njk,nunjucks,php,pug,py,razor,rb,rhtml,rs,slim,svelte,tpl,ts,tsx,twig,txt,vue}","priority":1},{"pattern":"/path/to/repository/theme/**/*.{,aspx,astro,cjs,css,cts,dist,eex,erb,gjs,gts,haml,handlebars,hbs,heex,html,jade,js,json,jsx,liquid,md,mdx,mjs,mts,mustache,njk,nunjucks,php,pug,py,razor,rb,rhtml,rs,slim,svelte,tpl,ts,tsx,twig,txt,vue}","priority":1},{"pattern":"/path/to/repository/tailwind/**","priority":2},{"pattern":"/path/to/repository/**","priority":4}],"user":false,"tailwind":{"version":"4.1.3","features":["css-at-theme","layer:base","content-list","source-inline","source-not"],"isDefaultVersion":false}}]
[Global] Preparing projects...
[Global] Initializing projects...
[tailwind.css] Initializing...
[Global] Adding watch patterns: /path/to/repository/tailwind.css, /path/to/repository
[tailwind.css] supported features: ["css-at-theme","layer:base","content-list","source-inline","source-not"]
[tailwind.css] Loaded tailwindcss v4.1.3: /path/to/repository/node_modules/tailwindcss
[tailwind.css] Building...
[Global] Adding watch patterns: /path/to/repository/tailwind/partials/header.css, /path/to/repository/tailwind/custom/base.css, /path/to/repository/tailwind/partials/footer.css, /path/to/repository/node_modules/tailwindcss/preflight.css, /path/to/repository/tailwind/tailwind-theme.css, /path/to/repository/tailwind/custom/file-header.css, /path/to/repository/tailwind/custom/fonts.css, /path/to/repository/tailwind/custom/utilities.css, /path/to/repository/tailwind/custom/components/components.css, /path/to/repository/node_modules/tailwindcss/utilities.css, /path/to/repository/node_modules/tailwindcss/theme.css, /path/to/repository/tailwind/tailwind-typography.config.js, /path/to/repository/node_modules/@_tw/typography/index.js
[Global] Adding watch patterns: /path/to/repository/tailwind/partials, /path/to/repository/tailwind, /path/to/repository/tailwind/custom, /path/to/repository/tailwind/custom/components
[Global] Initialized 1 projects

IntelliSense does not work anywhere. However, after opening two or three CSS files, this is added to the output:

[tailwind/tailwind-editor.css] Initializing...
[Global] Adding watch patterns: /Users/gregsullivan/Downloads/_tw 143/tailwind/tailwind-editor.css
[tailwind/tailwind-editor.css] supported features: ["css-at-theme","layer:base","content-list","source-inline","source-not"]
[tailwind/tailwind-editor.css] Loaded tailwindcss v4.1.3: /Users/gregsullivan/Downloads/_tw 143/node_modules/tailwindcss
[tailwind/tailwind-editor.css] Building...
[tailwind/tailwind-editor-extra.css] Initializing...
[Global] Adding watch patterns: /Users/gregsullivan/Downloads/_tw 143/tailwind/tailwind-editor-extra.css
[tailwind/tailwind-editor-extra.css] supported features: ["css-at-theme","layer:base","content-list","source-inline","source-not"]
[tailwind/tailwind-editor-extra.css] Loaded tailwindcss v4.1.3: /Users/gregsullivan/Downloads/_tw 143/node_modules/tailwindcss
[tailwind/tailwind-editor-extra.css] Building...

At that point, IntelliSense seems to work in both CSS and PHP files everywhere I've tried.

@gregsullivan
Copy link
Owner

After investigating further, it appears the lines for tailwind-editor.css are added when the first CSS file is opened, and tailwind-editor-extra.css when the second file is opened.

IntelliSense only works after the lines for tailwind-editor-extra.css appear in the log.

@gregsullivan
Copy link
Owner

I've posted an issue in the Tailwind CSS IntelliSense repository:

tailwindlabs/tailwindcss-intellisense#1302

It's definitely possible this is an issue on the _tw side, but my initial rounds of debugging haven't suggested any obvious fixes.

@gregsullivan gregsullivan added Type: Upstream Issues with upstream dependencies and removed Status: Needs Reporter Feedback labels Apr 8, 2025
@gregsullivan
Copy link
Owner

Initial reports from the upstream issue are that this is a bug on the IntelliSense side, with the developer taking a look today.

@luuktimmermans
Copy link
Author

Alright, I’m curious.

@gregsullivan
Copy link
Owner

The fix for this now has a draft pull request:

tailwindlabs/tailwindcss-intellisense#1335

@luuktimmermans
Copy link
Author

Alright, I’m curious when it gets added.

@gregsullivan
Copy link
Owner

This pull request has been added to the latest release:

https://github.com/tailwindlabs/tailwindcss-intellisense/releases/tag/v0.14.17

Please let me know if things are working for you!

@BenTechCoder
Copy link

Faced same issue, just updated the plugin and all seems to be working from a freshly generated project 👌

@gregsullivan
Copy link
Owner

Awesome, thanks for letting me know!

I'm going to close this as complete, but if anyone else encounters this issue, please comment below, and I'd be happy to revisit it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Reporter Feedback Type: Upstream Issues with upstream dependencies
Projects
None yet
Development

No branches or pull requests

3 participants