Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔧 feat: improved VSCode first time setup experience #1579

Closed
DennisLoska opened this issue Sep 27, 2023 · 0 comments · Fixed by #1581
Closed

🔧 feat: improved VSCode first time setup experience #1579

DennisLoska opened this issue Sep 27, 2023 · 0 comments · Fixed by #1581
Labels
🌟 enhancement New feature or request

Comments

@DennisLoska
Copy link

DennisLoska commented Sep 27, 2023

Initial VSCode setup after installing the project

I've never used Tailwind before and all my other projects use ESLint instead of Prettier for linting & formatting. I noticed some missing configuration in the ./vscode/settings.json which would have helped me getting started faster. My problem was, that I had already language specific formatters defined in my gloabal settings.json so the general "editor.defaultFormatter" setting in the project's settings.json would not apply and the Prettier plugin to automatically sort class names would not work.

What I was missing:

  • language specific formatter definitions
  • intellisense configuration to display tailwind intellisense popups

What I was missing in my workspace settings:

For the language specific settings this would suffice:

  "[javascript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[typescript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[typescriptreact]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  }

And for the Tailwind Intellisesne sugggestions to work out of the box adding this configuration did the trick:

  "editor.quickSuggestions": {
    "strings": true
  }

Final thoughts

You could argue I could just remove my global language specific settings, but that would be pretty annoying as I would then need to add project settings to all my other projects and since the workspace settings should always take priority in my opinion adding language specific overrides makes sense to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌟 enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant