I had been using VS Code on Elementary OS (essentially Ubuntu 18.04) with Prettier successfully. Some time recently Prettier stopped working (not sure when or how, but guessing it was with a VS Code update). I tried following all the posts I found - nothing has worked so far.
What I did last was remove VSCode using:
sudo apt remove code
and I also manually deleted the .vscode
directory. Then I reinstalled VS Code using:
sudo apt install code
so now VSCode is at version 1.82.2.
Then I installed Prettier (latest version, v10.1.0). So all I have now is VS Code and one extension. But the extension always appears Disabled. And apparently the extension is "disabled by the environment".
So even though Prettier is installed it does not appear as an option in the "Default Formatter" drop-down:
Many of the posts I have read suggest setting the Default Formatter as the fix for Prettier problems, but I don't even have it as an option.
I guess it makes sense that "esbenp.prettier-vscode" is unrecognized in my settings.json.
Anyone know how to get Prettier working again?
Apparently I had something called "Extension Bisect" running in the background. I'm guessing this is a native service within VSCode rather than an extension. I have several popups open when I launch VSCode suggesting extensions I should install and I have gotten into the bad habit of simply closing all of them. I didn't notice that one of these was informing me about "Bisect" disabling several extensions. The popup gave me the option of uninstalling or disabling Bisect (I don't recall which and I haven't found other posts to clarify). After doing so (i.e. uninstalling or disabling) Prettier started working as expected.