Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I modify the VS Code HTML formatter?

Currently trying to write some HTML for something. VS Code did an update yesterday and now the auto-formatter (Alt+Shift+F) is a different set of options and is overriding everything.

How do I access that specifical file to modify it. I currently have "Prettier" installed but it does not handle HTML

like image 984
Nebabon Avatar asked Jan 01 '26 19:01

Nebabon


2 Answers

Right-click in your text editing area and choose Format Document With.... A popup will appear on top then choose Choose default formatter and then choose Prettier

like image 130
Ayush Gupta Avatar answered Jan 03 '26 11:01

Ayush Gupta


  • You can trigger suggestions at any time by pressing Ctrl+Space.

  • To improve the formatting of your HTML source code, you can use the
    Format Document command Ctrl+Shift+I to format the entire file or
    Format Selection Ctrl+K Ctrl+F to just format the selected text.

Read this: https://code.visualstudio.com/docs/languages/html

like image 37
Mahesh Prajapati Avatar answered Jan 03 '26 12:01

Mahesh Prajapati



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!