0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

PHPでvscodeのformat on saveが効かない

Posted at

tl;dv

これで動いた

{
  "editor.formatOnSave": true,
  "[php]": {
    "editor.formatOnSave": true,
    "editor.defaultFormatter": "bmewburn.vscode-intelephense-client"
  }
}

Try

  1. まずはJSやTSでやる時と同じようにPrettier拡張機能入れる
  2. cmd + ,でsetting開いて、UserにもWorkspaceにもformat on saveにcheckがついてることを確認
  3. 「え、なんで動かないん?」
  4. PHP Intellisenseが入ってなかった。でもまだ動かない
  5. Default FormatterPHP Intellisenseを選択
  6. 動いた〜〜!

settings.jsonでメンバーみんなの環境統一した方がみんな苦労しないので、

{
  "editor.formatOnSave": true,
  "[php]": {
    "editor.formatOnSave": true,
    "editor.defaultFormatter": "bmewburn.vscode-intelephense-client"
  }
}

こんな感じで書いといた

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?