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

Being able to disable deno format (to use Prettier instead) #211

Closed
MaximeBernard opened this issue Sep 14, 2020 · 4 comments
Closed

Being able to disable deno format (to use Prettier instead) #211

MaximeBernard opened this issue Sep 14, 2020 · 4 comments

Comments

@MaximeBernard
Copy link

Is your feature request related to a problem? Please describe.

I have a monorepo (react/node with yarn workspaces) and one package is a deno app. I use some prettier config at the root folder and I'd like to use the same settings for my deno app.

Deno seems to be against a config file that and @lucacasonato suggested I could use prettier instead.

Describe the solution you'd like

I'd like a way to tell my vscode to stop using deno fmt

Bonus: if I could tell the extension to use prettier instead, that would be awesome (but I understand it's way more complex and brings a lot more questions/issues that you don't want to deal with)

@lucacasonato
Copy link
Member

Just install the Prettier extension and switch your default formatter to prettier. The deno extension doesn't force the use of deno fmt.

@MaximeBernard
Copy link
Author

MaximeBernard commented Sep 14, 2020

Thank you 🙏

Had the Prettier extension installed already but it wouldn't work and I had no idea why.

For those looking:

  • Open Command Palette...(Cmd+Shift+P)
  • Select Format Document With...
  • Select Configure Default Formatter...
  • Select Prettier - Code formatter

It's actually obvious once you know.

@cawoodm
Copy link

cawoodm commented Oct 12, 2021

What if you don't have prettier installed in node_modules? Because you use Deno, not Node?

Attempted to load Prettier module from c:\Marc\work\njinz
["ERROR"] Failed to load module. If you have prettier or plugins referenced in package.json, ensure you have run npm install
Cannot find module 'prettier' from ./

@kitsonk
Copy link
Contributor

kitsonk commented Oct 12, 2021

That would be a question for the prettier extension people.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants