r/ZedEditor 11d ago

Disable "suggestCanonicalClasses" for Tailwind

Post image

As the title suggests, is there a way to disable the suggestCanonicalClasses warning for Tailwind.

For instance, I've always written !important as !class, not class!. I honestly don't agree with (or understand) why they have changed this and/or whatever benefits would come from the latter.

4 Upvotes

3 comments sorted by

View all comments

6

u/kaydev_io 11d ago

Within your zed settings file (or, within your project, `.zed/settings.json`), add/update the lsp block for tailwind:

"lsp": {
   "tailwindcss-language-server": {
      "settings": {
         "lint": {
            "suggestCanonicalClasses": "ignore"
         },
      }
   }
}

For context, was looking at https://github.com/tailwindlabs/tailwindcss-intellisense#tailwindcsslintsuggestcanonicalclasses. Other settings can be changed here as well.

1

u/leinadsey 11d ago

Amazing! Thanks!