DEV Community

Zuhair Taha
Zuhair Taha

Posted on

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)