typescript - 代码格式化 Visual Studio Code - 行长

标签 typescript visual-studio-code vscode-settings

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

这是没有格式化的文件

Code without formatting

Code without formatting

格式化后:

Code formatted Code formatted

这些是我修改的设置

enter image description here

我可以做些什么来改进它?

最佳答案

在左侧菜单或文件菜单中打开扩展。

然后点击扩展设置按钮。

更改您正在使用的扩展程序的行长度。

enter image description here

关于typescript - 代码格式化 Visual Studio Code - 行长,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53253523/

相关文章:

typescript - 区分类联合

typescript - 没有第三方库的类型安全错误处理

visual-studio-code - 创建一个快捷方式来切换 VSCode 中的大纲 View

javascript - 将 Vuejs 单文件组件中的模板作为外部 HTML 文件导入

typescript - "... resolves to a non-module entity and cannot be imported using this construct"是什么意思?

powershell - 如何在 Visual Studio Code 中运行我的 Powershell 脚本?

javascript - Visual Studio 代码中未检测到 Eslint 样式指南

visual-studio-code - 如何为 vscode tmllanguage 启用注释快捷方式?

go - 为 vscode 项目/终端设置 $GOPATH

python - VSCode 自动完成功能不适用于从源代码安装的 OpenCV