원활한 협업을 위한 vscode 환경 세팅. tab-size=2는 기본으로 설정해두자
나는 vscode에서 기본 emmet 기능말고도
추가로 단축키를 사용자 커스텀하여 사용하고 있다.
파일>기본설정>사용자코드조각
에서 html, css, js, php 등에 대한 단축을 추가/수정할 수 있다.
파일->설정->hover로 검색 -> editor >hover:enabled 체크해제
"editor.formatOnType": true,
"editor.formatOnPaste": false,
"[javascript]": {
"editor.formatOnSave": true
},
"[css][scss][less]": {
"editor.defaultFormatter": "vscode.emmet"
},
"[html]": {
"editor.defaultFormatter": "vscode.html-language-features"
},
"[php]": {
"editor.defaultFormatter": "bmewburn.vscode-intelephense-client"
},
"editor.formatOnSave": true,
"php.validate.executablePath": "C:\\Users\\php-8.0.21-Win32-vs16-x64\\php.exe",
여기까지하면 대부분 해결 될겁니다. 만약,
! 아래와 같은 경고창뜨면서 프리터 작동안되면
C:\Users\php-8.0.21-Win32-vs16-x64\php.exe은(는) 유효한 PHP 실행 파일이 아니기 때문에 유효성을 검사할 수 없습니다. 'php.validate.executablePath' 설정을 사용하여 PHP 실행 파일을 구성하세요.
https://visualstudio.microsoft.com/ko/downloads/ 이 경로에서 visual studio2022용 microsoft visual c++ 재배포 가능 패키지 설치(기타 도구, 프레임워크 및 재배포 가능 패키지)설치 후 경로 지정
또는 아래 경로에서 다운로드 해준다.
https://soft41.ru/soft/server/http/PHP/ 에서 **php-8.0.21-Win32-vs16-x64.zip 다운로드하여 경로지정**