vunguyentuan/vscode-css-variables

Tailwind CSS IntelliSense extension and "Tailwind CSS" language mode

Closed this issue · 1 comments

I'm working on a Next.js project with Tailwind installed along with the Tailwind CSS IntelliSense extension for autocomplete of Tailwind classes in *.css files.

Screenshot 2024-04-25 at 3 55 33 PM

When the Language Mode is set to "Tailwind CSS" (see attached):

  1. Tailwind CSS IntelliSense works
  2. CSS Variable Autocomplete doesn't work

When the Language Mode is set to "CSS":

  1. Tailwind CSS IntelliSense doesn't work
  2. CSS Variable Autocomplete works

Is there a way I can configure CSS Variable Autocomplete to work in CSS files with Language Mode set to "Tailwind CSS"?

Adding tailwindcss to the languages in the VS Code settings appears to fix my issue:

  "cssVariables.languages": [
    "tailwindcss",
    "svelte",
    "scss",
  ]

I'm now able to leave the Language Mode set to Tailwind CSS and both autocomplete options now work.