vscode代码格式化配置
PHP Intelephense :php代码格式化,代码提示等功能
PHP Server:打开一个php文件,右键即可开启一个server,并在默认浏览器中运行当前文件
Laravel Blade formatter:laravel框架blade文件格式化
python、Black Formatter:python代码格式化及提示
Prettier :html、js、css等格式化
volar:vue文件格式化
按F1在搜索框中搜索settings.json,打开user settings.json添加以下内容
{
"workbench.colorTheme": "Default Dark+",
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"editor.formatOnType": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"prettier.printWidth": 150,
"[php]": {
"editor.defaultFormatter": "bmewburn.vscode-intelephense-client"
},
"phpserver.phpConfigPath": "E:\\env\\php-8.0.30-Win32-vs16-x64\\php.ini",
"phpserver.phpPath": "E:\\env\\php-8.0.30-Win32-vs16-x64\\php.exe",
"[blade]": {
"editor.defaultFormatter": "shufo.vscode-blade-formatter"
},
"[vue]": {
"editor.defaultFormatter": "Vue.volar"
},
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter"
},
"black-formatter.args": ["--line-length=150"]
}