I have Python & JavaScript code in the same project, and would like to use Prettier for JS, but am not really happy with Python code formatting options at this point. Since both Prettier and Python plugin respect editor.formatOnSave, I can't selectively turn on formatOnSave for Prettier only (the Python plugin does a bunch of stuff other than formatting which I need in my project). Adding a plugin-specific option for this would solve the problem.
Python is not supported by prettier currently, so you probably want to disable the other plugin instead. Apart from that you can use language specific settings in VScode. Currently on my phone so let me try to find info
Ah, the language-specific setting was exactly what I needed! Thank you so much. If anyone stumbles on this, I now have:
{
"editor.formatOnSave": false,
"[javascriptreact]": {
"editor.formatOnSave": true
}
}
@bjudson I tried with the above snippets in settings
dd'nt work for me
javascriptreact is for jsx files. Out of the box at least.
javascript should match js files.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
Ah, the language-specific setting was exactly what I needed! Thank you so much. If anyone stumbles on this, I now have: