prettier/prettier-vscode

Prettier doesn't appear in the list of formatters

Arsik0153 opened this issue · 6 comments

Summary

I am trying to format js/ts/jsx/tsx file but Prettier doesn't appear in the list of formatters in VSCode.

Steps To Reproduce:

  1. Open any .js/.ts/.tsx/.jsx file in vscode
  2. Click Ctrl + Shift + P and write "Format document"

Expected result

Prettier extension should appear on the list

Actual result

There's only "vscode.typescript-language-features" item on the list

Additional information

image

I also tried to set "editor.defaultFormatter": "esbenp.prettier-vscode" in settings.json, but this didn't help. With that, in notifications tab i get error message:
Extension 'Prettier - Code formatter' is configured as formatter but it cannot format 'TypeScript JSX'-files

This behavior started when I reinstalled my Windows 10. Before reinstallation, it worked perfectly.
I already tried clean installation of VSCode 2 times (includes removing Code folder in %appdata% and all extensions) but it still doesn't seem to be working.

I enabled logging of Prettier but I am stillunable to provide logs, because only thing I see from Prettier tab is:
image

VS Code Version:
Version: 1.88.1 (user setup)
Commit: e170252f762678dec6ca2cc69aba1570769a5d39
Date: 2024-04-10T17:41:02.734Z
Electron: 28.2.8
ElectronBuildId: 27744544
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Windows_NT x64 10.0.19045

Prettier Extension Version:
10.4.0

OS and version:
Windows 10 x64 22H2. Build 19045.4291
Project located in WSL2 folder

eifr commented

hi @Arsik0153, did you manage to solve\workaround it?

@eifr Yes, first of all I tried to update my VSCode, but it appears that I'm using my Windows system as administrator by default (it also led to another problems with extensions), so I can't really update my editor. For that reason, I decided to create non-admin user in Windows.
If you are using your system as administrator by default too, you can try to create another non-admin user and code from it. Hope this helps

eifr commented

@eifr Yes, first of all I tried to update my VSCode, but it appears that I'm using my Windows system as administrator by default (it also led to another problems with extensions), so I can't really update my editor. For that reason, I decided to create non-admin user in Windows.
If you are using your system as administrator by default too, you can try to create another non-admin user and code from it. Hope this helps

Hmmm... I'm using Linux though 😓

@eifr Have you tried clean installation?

eifr commented

@eifr Have you tried clean installation?

I tried, it's happening to the rest of my team too. I tried to delete the prettier config but it didn't help..

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.