Skip to content

intellisense not works after v0.14.16 #1388

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
FDiskas opened this issue May 28, 2025 · 10 comments · Fixed by #1401
Closed

intellisense not works after v0.14.16 #1388

FDiskas opened this issue May 28, 2025 · 10 comments · Fixed by #1401
Assignees
Labels
bug Something isn't working

Comments

@FDiskas
Copy link

FDiskas commented May 28, 2025

What version of VS Code are you using?

Version: 1.100.2

What version of Tailwind CSS IntelliSense are you using?

For example: v0.14.19

What version of Tailwind CSS are you using?

v^4.0.7
tried on a newer version same bug

What package manager are you using?

npm

What operating system are you using?

macOS

Tailwind config

@import 'tailwindcss/theme.css' layer(something) prefix(sm) important;
@layer something{
  .test{
    @import 'tailwindcss/preflight.css';
    @tailwind utilities;

    font-family: var(--sm-font-main);
  }
}

VS Code settings

{
  "files.associations": {
    "*.css": "tailwindcss"
  },
}

Reproduction URL

Private repo

Describe your issue

The problem is that after v0.14.16 extension version autocompletion stopped worked
No errors in tailwind CSS IntelliSens ouptut
Before:
Image

After:
Image

@thecrypticace
Copy link
Contributor

Hey, can you provide a reproduction? I'm not seeing any problems here.

@thecrypticace thecrypticace added the question Further information is requested label May 29, 2025
@FDiskas
Copy link
Author

FDiskas commented May 29, 2025

Reproducible example. Standard vitejs project with preact
package-lock.zip

Delete dist\assets\index.css file and plugin will start work after extensions reload.

@Applefrittr
Copy link

Applefrittr commented May 29, 2025

Just to add to this, Intellisense was working perfectly for me yesterday 5/28/2025.

Now it seems that any utility class that can use -number doesn't appear at all in the autocomplete dropdown:

Image

As well as colors i.e.: text-white:

Image

I should note that the utility classes compile correctly and the css is applied to the markup.

I'm working on an Astro project w/ the following deps:

Image

But this bug is also prevalent in all of my projects that use Tailwindcss, majority of which are Vite/React.

Oddly though, I have a Next.js project where the Intellisense is still functioning correctly but it was created with Tailwindcss ver 3.4.1.

P.S.: I may have inadvertently fixed it just messing around in my code base.

  • moved tailwindcss and @tailwindcss/vite to dev-dependencies
  • npm run build
  • I also added the following to my .vscode/settings.json file from a few stackoverflow suggestions:
    "css.validate": false,
    "editor.inlineSuggest.enabled": true,
    "tailwindCSS.emmetCompletions": true,
    "tailwindCSS.includeLanguages": {
    "html": "html",
    "javascript": "javascript",
    "css": "css",
    "typescript": "typescript",
    "astro": "astro"
    },
    "editor.quickSuggestions": {
    "strings": true
    }

Unsure if one OR all of the above points contributed to the fix.

Intelliense autocomplete is functioning properly again. Bugs I listed above are no longer appearing. Hope this helps

@matej-marcisovsky
Copy link

matej-marcisovsky commented May 30, 2025

I can confirm that it behaves strange with prefix. Without it I can see pixel variants of classes and color previews, with prefix I can see only classes without any information a color preview is not working,

Without prefix:
Image

With prefix:
Image

@thecrypticace
Copy link
Contributor

@Applefrittr Can you provide a reproduction? That sounds like the theme isn't loading but we're detecting a file as being the "root" for a Tailwind project.

Feels like we're picking the wrong file.

@Applefrittr
Copy link

Applefrittr commented May 30, 2025

@thecrypticace I was able to reproduce the problem consistently by cloning an Astro project from my github and comparing the Intellisense console output between my local copy and the cloned copy. See below:

Local copy:

Image

Cloned version:

Image

The problem appears to be that Intellisense chooses the 'root' file from the dist build INSTEAD of the src/styles/global.css. It also very odd that this problem happens whenever I boot up my IDE (vscode) and open the local copy. I have to rebuild the project by running 'npm run build' then both the outputs for my local copy and the cloned version are identical. The cloned copy DOES NOT have a dist build while my local version DOES have a dist build.

I didn't note this before but I do keep the extension up to date -> v0.14.20

@thesambayo
Copy link

@Applefrittr i was having issues with intellisense in my Zed editor, i tried what you just mentioned and it was true.
I deleted my dist folder and intellisense began to work

@FDiskas FDiskas changed the title Prefix is unsupported after v0.14.16 intellisense not works after v0.14.16 May 31, 2025
@thecrypticace thecrypticace self-assigned this Jun 2, 2025
@thecrypticace thecrypticace added bug Something isn't working and removed question Further information is requested labels Jun 4, 2025
@thecrypticace
Copy link
Contributor

Gonna get a release out today with the fix for this

@thecrypticace
Copy link
Contributor

v0.14.21 is out. This should be fixed now. Lemme know if things have improved (or if they haven't).

@Applefrittr
Copy link

@thecrypticace After updating the extension, the issues highlighted above are fixed without me having to delete my dist build OR rebuild my Astro project as well as a few other Vite/React projects whenever I boot up my IDE.

So far so good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants