代码格式化 Visual Studio 代码 - 行长 [英] Code formatting Visual Studio Code - Line Length

查看:42
本文介绍了代码格式化 Visual Studio 代码 - 行长的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 Visual Studio Code 已经有一段时间了.从昨天开始,代码格式没有按我预期的那样工作,但我没有更改任何配置.

这是没有格式化的文件

格式化后:

这些是我修改的设置

我可以做些什么来改善这一点?

解决方案

这不是 TypeScript 或 VSCode 这样做.

您安装了更漂亮的扩展程序.漂亮会一直这样做,因为

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

When it gets formatted:

These are the settings modified by me

What can I do form improving this?

解决方案

This is not TypeScript or VSCode doing this.

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

这篇关于代码格式化 Visual Studio 代码 - 行长的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆