It should be deprecated and banished for the sanity of developers everywhere.
Few days ago I ventured off the path of JS/TS/CSS/HTML/JSON and thought I try VScode with something new, ReScript.
I installed the plugin https://marketplace.visualstudio.com/items?itemName=chenglou92.rescript-vscode
But the formatting didn’t work.
Tried the same with a python formatter plugin, same problem.
After a little investigation I found that I had this configured at the top level of my settings.json
. It also has a nice GUI pulldown.
"editor.defaultFormatter": "esbenp.prettier-vscode",
And this was apparently overriding the ReScript and python plugins.
It might have been overriding ALL plugins, even for languages that prettier is not even registered to use, which is a diabolical thing to do.
After some googling I found that I could add this and fix my problem
"[rescript]": {
"editor.defaultFormatter": "chenglou92.rescript-vscode"
}
Or I could just set defaultFormatter
back to null
and let the plugins take over.
But I was wondering how many users have had this same problem? And how many plugins have to deal with this? And why did I think adding a defaultFormatter to the top level was a good idea?