Skip to content

IntelliSense only starts working after opening multiple files #1302

Closed
@gregsullivan

Description

@gregsullivan

What version of VS Code are you using?

1.99.0

What version of Tailwind CSS IntelliSense are you using?

0.14.14

What version of Tailwind CSS are you using?

4.1.3

What package manager are you using?

npm

What operating system are you using?

macOS

Reproduction URL

https://github.com/gregsullivan/_tw

Background

_tw is a starter theme for WordPress that adds support for Tailwind. After updating to Tailwind 4, IntelliSense stopped working because tailwind.css was kept in a subfolder. After moving it to the repository root, IntelliSense started working as expected.

Since then, an update either to Tailwind itself or to IntelliSense seems to have caused a new issue.

Describe your issue

When opening the project, IntelliSense doesn't work. This is the initial output:

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/_tw-master/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/_tw-master/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/_tw-master/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/_tw-master/tailwind/tailwind-editor-extra.css"}
[Global] Creating projects: [{"folder":"/path/to/repository/_tw-master","config":"/path/to/repository/_tw-master/tailwind.css","selectors":[{"pattern":"/path/to/repository/_tw-master/tailwind.css","priority":0},{"pattern":"/path/to/repository/_tw-master/node_scripts/zip.js","priority":1},{"pattern":"/path/to/repository/_tw-master/LICENSE","priority":1},{"pattern":"/path/to/repository/_tw-master/postcss.config.mjs","priority":1},{"pattern":"/path/to/repository/_tw-master/.prettierignore","priority":1},{"pattern":"/path/to/repository/_tw-master/.editorconfig","priority":1},{"pattern":"/path/to/repository/_tw-master/tailwind/tailwind-editor-extra.css","priority":1},{"pattern":"/path/to/repository/_tw-master/tailwind/tailwind-editor.css","priority":1},{"pattern":"/path/to/repository/_tw-master/tailwind/custom/components/components.css","priority":1},{"pattern":"/path/to/repository/_tw-master/tailwind/custom/file-header.css","priority":1},{"pattern":"/path/to/repository/_tw-master/tailwind/custom/fonts.css","priority":1},{"pattern":"/path/to/repository/_tw-master/tailwind/custom/utilities.css","priority":1},{"pattern":"/path/to/repository/_tw-master/tailwind/custom/base.css","priority":1},{"pattern":"/path/to/repository/_tw-master/tailwind/tailwind-typography.config.js","priority":1},{"pattern":"/path/to/repository/_tw-master/tailwind/partials/header.css","priority":1},{"pattern":"/path/to/repository/_tw-master/tailwind/partials/footer.css","priority":1},{"pattern":"/path/to/repository/_tw-master/tailwind/tailwind-theme.css","priority":1},{"pattern":"/path/to/repository/_tw-master/README.md","priority":1},{"pattern":"/path/to/repository/_tw-master/prettier.config.mjs","priority":1},{"pattern":"/path/to/repository/_tw-master/package.json","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/functions.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/404.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/inc/template-tags.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/inc/template-functions.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/theme.json","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/index.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/archive.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/js/readme.txt","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/comments.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/search.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/languages/readme.txt","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/header.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/template-parts/layout/header-content.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/template-parts/layout/footer-content.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/template-parts/content/content-single.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/template-parts/content/content-none.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/template-parts/content/content-page.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/template-parts/content/content-excerpt.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/template-parts/content/content.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/footer.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/single.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/page.php","priority":1},{"pattern":"/path/to/repository/_tw-master/phpcs.xml.dist","priority":1},{"pattern":"/path/to/repository/_tw-master/javascript/script.js","priority":1},{"pattern":"/path/to/repository/_tw-master/javascript/block-editor.js","priority":1},{"pattern":"/path/to/repository/_tw-master/eslint.config.mjs","priority":1},{"pattern":"/path/to/repository/_tw-master/composer.json","priority":1},{"pattern":"/path/to/repository/_tw-master/*","priority":1},{"pattern":"/path/to/repository/_tw-master/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/_tw-master/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/_tw-master/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/_tw-master/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/_tw-master/**","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/_tw-master","config":"/path/to/repository/_tw-master/tailwind/tailwind-editor.css","selectors":[{"pattern":"/path/to/repository/_tw-master/tailwind/tailwind-editor.css","priority":0},{"pattern":"/path/to/repository/_tw-master/node_scripts/zip.js","priority":1},{"pattern":"/path/to/repository/_tw-master/LICENSE","priority":1},{"pattern":"/path/to/repository/_tw-master/postcss.config.mjs","priority":1},{"pattern":"/path/to/repository/_tw-master/tailwind.css","priority":1},{"pattern":"/path/to/repository/_tw-master/.prettierignore","priority":1},{"pattern":"/path/to/repository/_tw-master/.editorconfig","priority":1},{"pattern":"/path/to/repository/_tw-master/tailwind/tailwind-editor-extra.css","priority":1},{"pattern":"/path/to/repository/_tw-master/tailwind/custom/components/components.css","priority":1},{"pattern":"/path/to/repository/_tw-master/tailwind/custom/file-header.css","priority":1},{"pattern":"/path/to/repository/_tw-master/tailwind/custom/fonts.css","priority":1},{"pattern":"/path/to/repository/_tw-master/tailwind/custom/utilities.css","priority":1},{"pattern":"/path/to/repository/_tw-master/tailwind/custom/base.css","priority":1},{"pattern":"/path/to/repository/_tw-master/tailwind/tailwind-typography.config.js","priority":1},{"pattern":"/path/to/repository/_tw-master/tailwind/partials/header.css","priority":1},{"pattern":"/path/to/repository/_tw-master/tailwind/partials/footer.css","priority":1},{"pattern":"/path/to/repository/_tw-master/tailwind/tailwind-theme.css","priority":1},{"pattern":"/path/to/repository/_tw-master/README.md","priority":1},{"pattern":"/path/to/repository/_tw-master/prettier.config.mjs","priority":1},{"pattern":"/path/to/repository/_tw-master/package.json","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/functions.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/404.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/inc/template-tags.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/inc/template-functions.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/theme.json","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/index.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/archive.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/js/readme.txt","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/comments.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/search.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/languages/readme.txt","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/header.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/template-parts/layout/header-content.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/template-parts/layout/footer-content.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/template-parts/content/content-single.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/template-parts/content/content-none.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/template-parts/content/content-page.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/template-parts/content/content-excerpt.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/template-parts/content/content.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/footer.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/single.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/page.php","priority":1},{"pattern":"/path/to/repository/_tw-master/phpcs.xml.dist","priority":1},{"pattern":"/path/to/repository/_tw-master/javascript/script.js","priority":1},{"pattern":"/path/to/repository/_tw-master/javascript/block-editor.js","priority":1},{"pattern":"/path/to/repository/_tw-master/eslint.config.mjs","priority":1},{"pattern":"/path/to/repository/_tw-master/composer.json","priority":1},{"pattern":"/path/to/repository/_tw-master/*","priority":1},{"pattern":"/path/to/repository/_tw-master/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/_tw-master/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/_tw-master/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/_tw-master/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/_tw-master/tailwind/**","priority":2},{"pattern":"/path/to/repository/_tw-master/**","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/_tw-master","config":"/path/to/repository/_tw-master/tailwind/tailwind-editor-extra.css","selectors":[{"pattern":"/path/to/repository/_tw-master/tailwind/tailwind-editor-extra.css","priority":0},{"pattern":"/path/to/repository/_tw-master/node_scripts/zip.js","priority":1},{"pattern":"/path/to/repository/_tw-master/LICENSE","priority":1},{"pattern":"/path/to/repository/_tw-master/postcss.config.mjs","priority":1},{"pattern":"/path/to/repository/_tw-master/tailwind.css","priority":1},{"pattern":"/path/to/repository/_tw-master/.prettierignore","priority":1},{"pattern":"/path/to/repository/_tw-master/.editorconfig","priority":1},{"pattern":"/path/to/repository/_tw-master/tailwind/tailwind-editor.css","priority":1},{"pattern":"/path/to/repository/_tw-master/tailwind/custom/components/components.css","priority":1},{"pattern":"/path/to/repository/_tw-master/tailwind/custom/file-header.css","priority":1},{"pattern":"/path/to/repository/_tw-master/tailwind/custom/fonts.css","priority":1},{"pattern":"/path/to/repository/_tw-master/tailwind/custom/utilities.css","priority":1},{"pattern":"/path/to/repository/_tw-master/tailwind/custom/base.css","priority":1},{"pattern":"/path/to/repository/_tw-master/tailwind/tailwind-typography.config.js","priority":1},{"pattern":"/path/to/repository/_tw-master/tailwind/partials/header.css","priority":1},{"pattern":"/path/to/repository/_tw-master/tailwind/partials/footer.css","priority":1},{"pattern":"/path/to/repository/_tw-master/tailwind/tailwind-theme.css","priority":1},{"pattern":"/path/to/repository/_tw-master/README.md","priority":1},{"pattern":"/path/to/repository/_tw-master/prettier.config.mjs","priority":1},{"pattern":"/path/to/repository/_tw-master/package.json","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/functions.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/404.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/inc/template-tags.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/inc/template-functions.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/theme.json","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/index.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/archive.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/js/readme.txt","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/comments.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/search.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/languages/readme.txt","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/header.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/template-parts/layout/header-content.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/template-parts/layout/footer-content.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/template-parts/content/content-single.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/template-parts/content/content-none.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/template-parts/content/content-page.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/template-parts/content/content-excerpt.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/template-parts/content/content.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/footer.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/single.php","priority":1},{"pattern":"/path/to/repository/_tw-master/theme/page.php","priority":1},{"pattern":"/path/to/repository/_tw-master/phpcs.xml.dist","priority":1},{"pattern":"/path/to/repository/_tw-master/javascript/script.js","priority":1},{"pattern":"/path/to/repository/_tw-master/javascript/block-editor.js","priority":1},{"pattern":"/path/to/repository/_tw-master/eslint.config.mjs","priority":1},{"pattern":"/path/to/repository/_tw-master/composer.json","priority":1},{"pattern":"/path/to/repository/_tw-master/*","priority":1},{"pattern":"/path/to/repository/_tw-master/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/_tw-master/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/_tw-master/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/_tw-master/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/_tw-master/tailwind/**","priority":2},{"pattern":"/path/to/repository/_tw-master/**","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/_tw-master/tailwind.css, /path/to/repository/_tw-master
[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/_tw-master/node_modules/tailwindcss
[tailwind.css] Building...
[Global] Adding watch patterns: /path/to/repository/_tw-master/tailwind/partials/header.css, /path/to/repository/_tw-master/tailwind/custom/base.css, /path/to/repository/_tw-master/tailwind/partials/footer.css, /path/to/repository/_tw-master/node_modules/tailwindcss/preflight.css, /path/to/repository/_tw-master/tailwind/custom/utilities.css, /path/to/repository/_tw-master/tailwind/custom/components/components.css, /path/to/repository/_tw-master/node_modules/tailwindcss/utilities.css, /path/to/repository/_tw-master/tailwind/tailwind-theme.css, /path/to/repository/_tw-master/tailwind/custom/file-header.css, /path/to/repository/_tw-master/tailwind/custom/fonts.css, /path/to/repository/_tw-master/node_modules/tailwindcss/theme.css, /path/to/repository/_tw-master/tailwind/tailwind-typography.config.js, /path/to/repository/_tw-master/node_modules/@_tw/typography/index.js
[Global] Adding watch patterns: /path/to/repository/_tw-master/tailwind/partials, /path/to/repository/_tw-master/tailwind, /path/to/repository/_tw-master/tailwind/custom, /path/to/repository/_tw-master/tailwind/custom/components
[Global] Initialized 1 projects

Opening a file adds new output:

[tailwind/tailwind-editor.css] Initializing...
[Global] Adding watch patterns: /path/to/repository/_tw-master/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: /path/to/repository/_tw-master/node_modules/tailwindcss
[tailwind/tailwind-editor.css] Building...

Opening a different file adds further output:

[tailwind/tailwind-editor-extra.css] Initializing...
[Global] Adding watch patterns: /path/to/repository/_tw-master/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: /path/to/repository/_tw-master/node_modules/tailwindcss
[tailwind/tailwind-editor-extra.css] Building...

After this, IntelliSense works.

(The project has multiple entry points for Tailwind files to support the WordPress block editor, which doesn't work well with Preflight.)

If I use Developer: Reload Window, the same thing happens, but this error appears in the output:

[Error - 10:38:55 PM] Request textDocument/documentLink failed.
  Message: Unhandled method textDocument/documentLink
  Code: -32601 

IntelliSense will still begin working after opening multiple files, though.

I'd be happy to provide any other details you might find useful. Thanks very much for your time!

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions