vunguyentuan / vscode-css-variables

CSS variables autocomplete for vscode
https://marketplace.visualstudio.com/items?itemName=vunguyentuan.vscode-css-variables
MIT License
139 stars 22 forks source link

Tailwind CSS IntelliSense extension and "Tailwind CSS" language mode #87

Closed tomgenoni closed 7 months ago

tomgenoni commented 7 months ago

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"?

tomgenoni commented 7 months ago

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.