Skip to content

Commit d57e587

Browse files
cseufertczosel
andauthored
Added PhpStorm/Jetbrains config guide (#1787)
* Added PhpStorm/Jetbrains config guide - Fixes #1727 - Fixes #452 * Update README.md to fix grammar Co-authored-by: Christian Zosel <christian@zosel.ch> Co-authored-by: Christian Zosel <christian@zosel.ch>
1 parent 575e0e6 commit d57e587

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,20 @@ The official [prettier plugin for atom](https://github.com/prettier/prettier-ato
221221

222222
The official [prettier plugin for vscode](https://github.com/prettier/prettier-vscode) supports plugins since Version 1.10.0. To enable it, install the extension and make sure the plugin is installed _locally_ (in your project folder). After restarting VScode the plugin should work as expected.
223223

224+
### PhpStorm / IntelliJ / Jetbrains IDE
225+
226+
- Install prettier and plugin locally `yarn add -D prettier @prettier/plugin-php`
227+
- Open Settings (File, Settings)
228+
- Go to Plugins Section, Select Marketplace, Search for Prettier, Install Plugin, Restart IDE
229+
- Open Settings, Search for Prettier, select Prettier in left settings navigation
230+
- Check prettier package has auto-detected, should be something like `myproject/node_modules/prettier`
231+
- Update Run for Files to include .php, eg: `{**/*,*}.{js,ts,jsx,tsx,php,json,scss,vue,md}`
232+
- Tick the On Save button, if you want your files formatting updated on file save
233+
- Clock OK to save settings
234+
235+
_Note: Just pressing save does not reformat your current file unless the file has been modified in some way,
236+
alternatively you can use the Prettier shortcut Ctrl+Alt+Shift+P_
237+
224238
### Sublime Text
225239

226240
Sublime Text support is available through Package Control and the [JsPrettier](https://packagecontrol.io/packages/JsPrettier) plugin.

0 commit comments

Comments
 (0)