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

Extension is overriding language association #1111

Closed
universse opened this issue Dec 17, 2024 · 5 comments · Fixed by #1116
Closed

Extension is overriding language association #1111

universse opened this issue Dec 17, 2024 · 5 comments · Fixed by #1116

Comments

@universse
Copy link

universse commented Dec 17, 2024

What version of VS Code are you using?

1.96.0

What version of Tailwind CSS IntelliSense are you using?

0.12.16

What version of Tailwind CSS are you using?

3.4.16

What package manager are you using?

pnpm

What operating system are you using?

Windows 11

VS Code settings

image

Describe your issue

CSS files' language association are overridden Tailwind CSS even though there's language association settings.

@HolyfcMoly
Copy link

Same issue here. I also added .css to tailwindCSS.files.exclude and set "tailwindCSS.validate": false, but none of these solutions worked for me. I still haven't found a solution.

@thecrypticace
Copy link
Contributor

We do this when we find Tailwind CSS in a project. If you manually switch the file back to CSS it shouldn't switch back but I'll have to double check that part to see if it's functioning correctly.

Is this happening in projects that don't use it? Or is there a reason that it shouldn't?

@universse
Copy link
Author

It only happens with projects that use Tailwind CSS. Manual switching works as expected, but need to do this every time you open a different file.

Anyway I think the plugin should respect VSCode config and not automatically set language association. This is from the plugin details page itself.
image

@piotrjoniec
Copy link

The solution for now is to downgrade to v0.12.12. It's the last version which doesn't forcefully change the language on CSS files. Hopefully this can be fixed.

Also, the Tailwind CSS vscode language breaks the editor.formatOnSave setting. Formatting on save just stops working.

@thecrypticace
Copy link
Contributor

I've reverted the change. It'll go out in the pre-release in a bit and I'll tag a new stable release today or tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants