theron-wang / VS2022-Editor-Support-for-Tailwind-CSS

Unofficial VS2022 Tailwind CSS extension for IntelliSense, linting, sorting, and more to enhance the development experience in Visual Studio 2022.
https://marketplace.visualstudio.com/items?itemName=TheronWang.TailwindCSSIntellisense
MIT License
86 stars 5 forks source link

Not working for tsx files #41

Closed mcapodici closed 4 months ago

mcapodici commented 4 months ago

With this tailwind config:

/** @type {import('tailwindcss').Config} */
export default {
    content: [
        "./index.html",
        "./src/**/*.{js,ts,jsx,tsx}",
    ],
    theme: {
        extend: {},
    },
    plugins: [],
}

The plugin works for the html file but not the .tsx files. By not work, I mean that it wont suggest classes, whether using "class" or "className". It does work on the index.html, which proves it is working to some extent.

theron-wang commented 4 months ago

Unfortunately, Visual Studio doesn’t allow extensions to override HTML IntelliSense in .tsx and .jsx files. If VS eventually adds support or if I find another solution, I will be sure to let you know. Sorry about this!

mcapodici commented 4 months ago

Ah I see, that is a annoying. Thanks for creating the extension though, it is very useful.

theron-wang commented 3 months ago

I did find a solution to this issue - jsx and tsx files should now have support in 1.4.0. Glad to hear that you find the extension useful!

mcapodici commented 3 months ago

Nice, thanks for fixing!