score:0

you have to include the files, in which you want to work with tailwind css in your tailwind.config.js file. you can replace:

content: [],

with

content: ["*"],

it will include all files in your project. save it and now the tailwind css intellisense will popup the suggestions.

score:1

you should configure the tailwindcss.includelanguages settings in your vscode settings as explayned here:

https://marketplace.visualstudio.com/items?itemname=bradlc.vscode-tailwindcss

score:1

both combined worked for me.

   "tailwindcss.includelanguages": {
        "javascript": "javascript",
        "html": "html"
      },

and

try to delete the "tailwind.config.js" and create it back again with

npx tailwindcss init

score:2

try to delete the "tailwind.config.js" and create it back again with

npx tailwindcss init

and it should start working.

score:5

add this at the end of your setting.json file in order to get intellisense on both html and js file

"tailwindcss.includelanguages": {
    "javascript": "javascript",
    "html": "html"
  },

score:8

i faced this issue even after configuring tailwindcss.includelanguages settings.

so make sure you configure the below settings as well to allow suggestions inside a string.

"editor.quicksuggestions": {
    "strings": true
}

score:13

edit your settings.json as below:

{
  // other settings
  "tailwindcss.includelanguages": {
    "javascript": "javascript",
    "html": "html"
  },
  "editor.quicksuggestions": {
    "strings": true
  }
}

score:14

here's how to get tailwind intellisense to work with react files

  1. go to tailwind css settings and add javascript support "tailwindcss.includelanguages": { "plaintext": "javascript" }
  2. reload vscode

if this doesn't fix things, try using ctrl + space before adding a class name.

view image of tailwind settings


Related Query

More Query from same tag