Home > Software design >  How Can I turn in VSCode TailwindCSS Intellisense tips in dictionaries with specific names?
How Can I turn in VSCode TailwindCSS Intellisense tips in dictionaries with specific names?

Time:04-12

I store my Tailwind classes in reactapp in dictionaries:

const styles = {
wrapper: "overflow-hidden pb-8 bg-red-50"
...
}

I want to have Intellisense tips there, which by default - doesn't work here. I found the solution in TailwindCSS Intellisense extension settings:

"tailwindCSS.classAttributes": [
    ""
  ]

The setting "" make that Intellisense tips show inside strings in my styles dictionary BUT they also appear in every other string in every other dictionary ;_;

Is it possible to set showing TailwindCss Intellisense tips only in dictionaries with specific names?

CodePudding user response:

I found the answer right before i clicked "Post you question"

I don't believe it is that simple...

You can just put the name in the same option and it is working:

"tailwindCSS.classAttributes": [
    "styles"
  ]

And now in every dictionary called styles I have Tailwind Intellisense tips, and i don't have them i other dictionaries. Awesome! :>

  • Related