Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prettier doesn't appear in the list of formatters #3375

Closed
Arsik0153 opened this issue Apr 19, 2024 · 5 comments
Closed

Prettier doesn't appear in the list of formatters #3375

Arsik0153 opened this issue Apr 19, 2024 · 5 comments

Comments

@Arsik0153
Copy link

Arsik0153 commented Apr 19, 2024

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
Copy link

eifr commented May 16, 2024

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

@Arsik0153
Copy link
Author

@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
Copy link

eifr commented May 16, 2024

@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 😓

@Arsik0153
Copy link
Author

@eifr Have you tried clean installation?

@eifr
Copy link

eifr commented May 16, 2024

@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..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants