エックスサーバーで実行するphpのプログラムを作成するメモ3(macのvscode)
MacにVSCodeをインストール
公式サイトからDownload for macOSをクリックしてVSCode-darwin-universal.zipをダウンロード。
展開したVisual Studio Code.appをアプリケーションフォルダに移動。v1.88.1がインストールされた。
アプリケーションフォルダのVisual Studio Code.appをDockにドラッグ&ドロップ。
起動
英語メニューで起動する。

日本語化
起動後の画面の右下に言語パックをインストールが表示されたので、そのままインストール。
Windowsのときはなかったような?
再起動後、日本語表示になる。

拡張機能をクリックすると

Japanese Language Pack for Visual Studio Codeがインストールされているのを確認できる。
PHP Intelephense
PHP Intelephense拡張機能を検索してインストール。
v1.10.4がインストールされた。

VSCodeに組み込まれている「PHP 言語機能」を無効にする
VSCodeで拡張機能の一覧を開いて「@builtin php」と検索する。
「PHP 言語機能」を無効にする。

VSCodeの設定
タブサイズを4→2

Detect Indentationを外す

Default Formatterをなし→PHP Intelephenseに変更

Format On Saveにチェック

PHP DocBlocker拡張機能
PHP DocBlocker拡張機能を検索してインストール。
v2.7.0がインストールされた。

functionの上部で、/**と打ってエンターキーを押すと

自動的に、PHPdocコメントが挿入される。

挿入されたら説明を記述する。

以上です。
ディスカッション
コメント一覧
まだ、コメントがありません