Problems with HTML indentation using Prettier in VSC?

Asked

Viewed 208 times

1

Can anyone tell me why the indentation of Prettier (extension of VSC) is not working in HTML file, configured to indent with 4 spaces, works in CSS and in the JS, but does not work in the HTML.

How can I fix this?

CSS - ok

inserir a descrição da imagem aqui

JS - ok

inserir a descrição da imagem aqui

HTML - no

inserir a descrição da imagem aqui

Config do Prettier

inserir a descrição da imagem aqui

I already tried to dial and cancel the checkBox, but it didn’t work.

1 answer

2


Solved

The problem was q had several formatting patterns available to make the indentation installed on my VSC, and he couldn’t pick one. I pressed ctrl + shift + F (in the HTML file), then VSC ordered to choose one of the available formatting types, I chose Prettier and from there it started to format HTML using Prettier automatically (when saving). Here’s the solution in case someone has the same problem.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.