Written by
php-style
on
on
MAC VSCODE PHP-CS-FIXER 쉽게 설치하기
MAC VSCODE PHP-CS-FIXER 쉽게 설치하기
반응형
MAC VSCODE PHP-CS-FIXER 쉽게 설치하기
우선 마켓플레이스에서 php cs fixer를 검색하여 확장자를 설치한다.
brew install php-cs-fixer
콘솔에서 brew로 php-cs-fixer 설치를 하고
brew list php-cs-fixer
php-cs-fixer 가 설치된 경로를 확인한다.
상단 -> 기본 설정 -> 설정을 열고 우상단의 가운데를 눌러 code 로 변환
"php-cs-fixer.onsave": true, "php-cs-fixer.executablePath": "/usr/local/Cellar/php-cs-fixer/3.3.2/bin/php-cs-fixer", "[php]": { "editor.defaultFormatter": "junstyle.php-cs-fixer" }
executablePath 는 설치된 자신의 경로로 설정
가장 맨아래에 아래 내용을 추가한다.
VSCODE 를 재시작하여 php 파일을 수정해보고 fixer가 동작하는지 확인한다.
마켓플레이스 안내하는 phar 로 설치하는 방법이 복잡스러워서 설정해보다가
삽질하고 올려본다.
반응형
from http://sighted.tistory.com/27 by ccl(A) rewrite - 2021-11-25 11:00:30