tailwindlabs / tailwindcss-intellisense

Intelligent Tailwind CSS tooling for Visual Studio Code
2.82k stars 194 forks source link

VSCode color picker breaks in JS/TS files #961

Open larsnystrom opened 5 months ago

larsnystrom commented 5 months ago

What version of VS Code are you using?

For example: v1.88.1

What version of Tailwind CSS IntelliSense are you using?

For example: v0.10.5

What version of Tailwind CSS are you using?

For example: v3.1.8

What package manager are you using?

For example: npm

What operating system are you using?

For example: Linux devcontainer, client is running macOS

Tailwind config

VS Code settings

Reproduction URL

Describe your issue

When opening a regular .ts file in my workspace, color hinting with the default VSCode color picker works for a few seconds. Then it stops working. If I disable the Tailwind CSS IntelliSense extension it doesn't stop working, so it probably has to do with the color decorator/picker in this extension. I've tried setting "tailwindCSS.colorDecorators": false but that doesn't change the behavior. The problem is not present in .less files, but it is present in both .ts and .js files.

Here is a file with which I can reproduce this behavior:

export const red = "#ff0033";

export const ChartColors = [
  "rgb(0, 157, 220)",
  "rgb(255, 99, 132)",
  "rgb(255, 159, 64)",
  "rgb(255, 205, 86)",
  "rgb(75, 192, 192)",
  "rgb(153, 102, 255)",
  "rgb(201, 203, 207)",
];

Here is the behavior I'm seeing after reloading the window (color picker disappears 18 seconds in):

https://github.com/tailwindlabs/tailwindcss-intellisense/assets/1000370/555450a8-e65f-4649-86dc-92033ca34f12

manastunga787 commented 2 weeks ago

Same issue i am also facing enabling the extension it hides the color picker and disabling the tailwind vscode extension the color picker is back in .ts or .js file