Coding editor setup
PHPStorm
Plugins
PHPfmt
- Download file fmt.phar
https://www.dropbox.com/s/3jipogskc38gdg8/fmt.phar?dl=0
Install phpstorm fmt plugin:https://plugins.jetbrains.com/plugin/8110-phpstorm-phpfmtSetting plugin
If you cannot install the plugin, try the File Watcher method:
Argument:
/path/to/fmt.phar --indent_with_space=4 --enable_auto_align $FilePath$
JS Prettier
- Install
- In the embedded Terminal (Alt+F12), type one of the following commands:
npm install --save-dev --save-exact prettier
npm install --global prettier
- Install plugin: https://plugins.jetbrains.com/plugin/10456-prettier/
- Setting
- In the Settings/Preferences dialog Ctrl+Alt+S, go to Languages and Frameworks | JavaScript | Prettier.
- On the Prettier page, that opens, specify the path to the prettier package and choose the Node.js interpreter to use. This can be a local Node.js interpreter or a Node.js on Windows Subsystem for Linux.
- Autoformat on save
- See the guide here: https://prettier.io/docs/en/webstorm.html#running-prettier-on-save-using-file-watcher