Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Code formatting Visual Studio Code - Line Length

I've been working with Visual Studio Code for a while. Since yesterday the code formatting is not working as I expect but I haven't changed any configuration.

This is the file without formatting

Code without formatting

Code without formatting

When it gets formatted:

Code formatted Code formatted

These are the settings modified by me

enter image description here

What can I do form improving this?

like image 272
Gabriel Castillo Prada Avatar asked Nov 11 '18 21:11

Gabriel Castillo Prada


2 Answers

Open Extensions on the menu on the left or File menu.

Then click on the extension settings button.

Change the line length for the extension you are working with.

enter image description here

like image 121
live-love Avatar answered Sep 21 '22 00:09

live-love


This is not TypeScript or VSCode doing this.

You have the prettier extension installed. Prettier will always do this, as prettier knows better

enter image description here

like image 25
basarat Avatar answered Sep 22 '22 00:09

basarat