DEV Community

Zuhair Taha
Zuhair Taha

Posted on

2

How to use custorm prettier extension at vscode?

Hello,
I want to use the prettier extension at vscode. But I want to use this one
https://www.npmjs.com/package/@btmills/prettier
instead of the original one.
Is there any settings at .prettierrc file or and vscode settings to do to make it use it to format the code?

πŸ‘Œ What I tried to do to format current opened file and save all files, is to add macros extension, then to add next lines at settings.json:

  "macros": {
    "prettierAndSaveAll": [
      {
        "command": "workbench.action.terminal.sendSequence",
        "args": {
          "text": "./node_modules/.bin/prettier --write '${file}'\u000D"
        }
      },
      "workbench.action.files.saveAll"
    ]
  }

But I have to keep terminal open to make it works, and I feel that it is slow πŸ™„.
So I'm not happy with this way and looking for better

Top comments (0)

Eliminate Context Switching and Maximize Productivity

Pieces.app

Pieces Copilot is your personalized workflow assistant, working alongside your favorite apps. Ask questions about entire repositories, generate contextualized code, save and reuse useful snippets, and streamline your development process.

Learn more

πŸ‘‹ Kindness is contagious

Please leave a ❀️ or a friendly comment on this post if you found it helpful!

Okay