plugin-php
plugin-php copied to clipboard
Format On Save not working on VSCODE (Windows 10)
I tried to search on close/open issues but no avail.
What is wrong with my settings? Please help. Thanks
Prettier 2.2.1
PHP Plugin 0.16.1
package.json
"devDependencies": {
"@prettier/plugin-php": "^0.16.1",
"axios": "^0.21",
"laravel-mix": "^6.0.6",
"lodash": "^4.17.19",
"postcss": "^8.1.14",
"prettier": "^2.2.1"
}
.prettierrc.json:
{
"useTabs": true,
"overrides": [
{
"files": ["*.p"],
"options": {
"parser": "php",
"phpVersion": "7.4",
"braceStyle": "1tbs",
"embeddedLanguageFormatting": "off",
"singleQuote": true
}
}
]
}
My VS Code Settings:
"editor.formatOnSave": false,
"[php]": {
"editor.formatOnSave": true,
"editor.formatOnPaste": true
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
Expected behavior:
hi @jbersamin-vitech ,
(I don't know much about this but) this line of your .prettierrc.json stood out to me:
"files": ["*.p"],
should it be *.php ?
(or maybe your php files have a .p extension)
@nicoder I tried to change it to .php and still not working. If I could just see any errors in the output inside the VSCODE. I could have fix this.