Prettier-plugin-tailwindcss not working in Cursor (works in VSCode)

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

TailwindCSS classes sorting with prettier-plugin-tailwindcss doesn’t work.
I feel it stopped around the latest issues with prettier.
Prettier extension (12.3.0) seems to be back to normal in Cursor 2.4.21.
But the prettier-plugin-tailwindcss doesn’t work. I tried with 0.6.12 and 0.7.2.

Testing the same setup in VSCode and it works as expected.

Steps to Reproduce

Cursor 2.4.21
Extension: Prettier 12.3.0
prettier-plugin-tailwindcss installed. latest version 0.7.2
plugins: ['prettier-plugin-tailwindcss'], added in prettier.config.js

Try with something like <div className="text-white flex mt-2 px-4 ">Test </div>
Auto format on save
cmd+s

Expected Behavior

It should auto format and sort classes to <div className="mt-2 flex px-4 text-white">Test </div>

Operating System

MacOS

Version Information

Version: 2.4.21
VSCode Version: 1.105.1
Commit: dc8361355d709f306d5159635a677a571b277bc0
Date: 2026-01-22T16:57:59.675Z (4 days ago)
Build Type: Stable
Release Track: Default
Electron: 39.2.7
Chromium: 142.0.7444.235
Node.js: 22.21.1
V8: 14.2.231.21-electron.0
OS: Darwin arm64 24.6.0

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

Hey, thanks for the report. It looks like this is related to the current Prettier issues in version 2.4.x.

A few things to check:

  1. Does normal Prettier formatting work without the tailwindcss plugin? Try temporarily removing the plugins line from your prettier.config.js and see if format-on-save works.
  2. Can you check the Prettier output for errors? Go to View > Output, then select “Prettier” in the dropdown. Do you see any errors there?
  3. As a temporary workaround, try rolling back the Prettier extension to v11.0.2 (Extensions > Prettier > Install Specific Version). Some users reported this fixes plugin issues while we work on a full fix.

Let me know what you find.

Hi, thanks for reply.

Yes, it seems related to the recent prettier issues. I don’t know for sure, but I noticed prettier-plugin-tailwindcss stopped working around the same time as Prettier in general (~early last week).

Regarding your Qs:
1/ normal prettier formatting works now.

2/ Yes I checked that. No errors. It lists the plugin but the plugin doesn’t seem to work.

This is what I have in the output.

["INFO" - 1:52:17 PM] Using config file at (..........)/prettier.config.js
["INFO" - 1:52:17 PM] EditorConfig support is enabled, checking for .editorconfig files
["INFO" - 1:52:17 PM] Resolved config:
{
  "useTabs": false,
  "tabWidth": 2,
  "endOfLine": "lf",
  "trailingComma": "all",
  "singleQuote": true,
  "bracketSpacing": true,
  "bracketSameLine": true,
  "printWidth": 100,
  "semi": true,
  "plugins": [
    "prettier-plugin-tailwindcss"
  ],
  "tailwindFunctions": [
    "clsx",
    "twMerge",
    "cva"
  ],
  "importOrder": [
    "^@",
    "^app-shared/(.*)$",
    "^pages/(.*)$",
    "^components/(.*)$",
    "^lib/(.*)$",
    "^[./]"
  ],
  "tailwindStylesheet": "./styles/global.css"
}

3/ Reg downgrading to Prettier 11.0.2 - yes I checked that. I was using this workaround when Prettier was not working at all to have at least the basic formatting. Unfortunately prettier-plugin-tailwindcss doesn’t work at 11.0.2 nor the newest 12.3.0

Exactly same setup works in VSCode.
I noticed this issue in a larger monorepo, but just checked in a simple single nextjs project and also no luck.

1 Like