tailwindlabs / tailwindcss-intellisense

Intelligent Tailwind CSS tooling for Visual Studio Code
2.74k stars 182 forks source link

How do I enable tracing between tailwindcss and VS Code? #968

Closed mrnugget closed 1 month ago

mrnugget commented 1 month ago

What version of VS Code are you using?

Version: 1.89.1

What version of Tailwind CSS IntelliSense are you using?

Version: 0.10.5

What operating system are you using?

For example: macOS

VS Code settings

{
  "tailwindcss.trace.server": "verbose"
}

Describe your issue

I'm working on Zed and want to improve support for this language server. It's helpful if I can see what it does when talking to VS Code.

According to these docs here, I can enable tracing in VS Code by setting [langId].trace.server in the configuration.

I tried that and it doesn't work.

What's the langId that I need to put in here?

thecrypticace commented 1 month ago

Hey! Love Zed so much!

I took a look and VSCode's docs on this are just awful. [langId] should really be described as [clientId] which is the Client ID of the language server in the extension that is provided to new LanguageClient(…). Our client ID is tailwindcss-intellisense

Adding this to the VSCode user settings appears to work for me:

"tailwindcss-intellisense.trace.server": "verbose",

VSCode is convinced the setting doesn't exist but setting it does work. Probably something I need to add to the extensions package.json. I'll look into that tomorrow.

Screenshot 2024-05-16 at 08 15 53

I've been testing the insiders builds of the language server in Zed by npm installing in the ~/Library/Application\ Support/Zed/languages/tailwindcss-language-server/ dir — custom paths in settings would be amazing 👀 😅 (I'd totally work on a PR for this btw if I had some direction)

mrnugget commented 1 month ago

Thank you!

I've been testing the insiders builds of the language server in Zed by npm installing in the ~/Library/Application\ Support/Zed/languages/tailwindcss-language-server/ dir — custom paths in settings would be amazing 👀 😅 (I'd totally work on a PR for this btw if I had some direction)

I got you: https://github.com/zed-industries/zed/pull/11921

thecrypticace commented 1 month ago

❤️ ❤️ ❤️ ❤️

thecrypticace commented 1 month ago

VSCode is convinced the setting doesn't exist but setting it does work. Probably something I need to add to the extensions package.json. I'll look into that tomorrow.

fixed in https://github.com/tailwindlabs/tailwindcss-intellisense/commit/396f3d32c08a89f4bf646643bfb7ff999245f384

mrnugget commented 1 month ago

That's some interesting indentation, but I'll take it 😄

thecrypticace commented 1 month ago

I fixed it in a follow up commit. Copy & paste gone wrong :D