Small FYI if you want to install this wonderful plugin for every Elixir/Phoenix project:
- Install the
prettier
andprettier-plugin-eex
npm packagesglobally
with:
npm install -g prettier prettier-plugin-eex
-
Make sure that you have the Prettier VSCode Extension installed.
-
Find the global path to which
npm
installed yourprettier
package. These are some common paths:
# macOS
/usr/local/lib/node_modules/prettier
# unix
/usr/local/lib/node_modules/prettier
# Windows
%USERPROFILE%\AppData\Roaming\npm\node_modules/prettier
- Set that
global path
as aPrettier: Prettier Path
either in yourSettings
underExtensions > Prettier > Prettier: Prettier Path
or in yoursettings.json
directly:
"prettier.prettierPath": GLOBAL_PATH
# e.g. "prettier.prettierPath": "/usr/local/lib/node_modules/prettier"
Thank you @adamzapasnik for this great plugin!