简体   繁体   English

在 VS Code 中为 Flutter 项目更改默认选项卡大小

[英]Change the default tab size in VS Code for Flutter projects

When I create a new flutter project using flutter create and open the project in VSCode it always says the configured tab size is 2 when my user settings say it should be 4 and I can't find anywhere that says that tab size is configured to be 2.当我使用 flutter create 创建一个新的 flutter 项目并在 VSCode 中打开该项目时,它总是说配置的选项卡大小为 2,而我的用户设置说它应该是 4 并且我找不到任何说选项卡大小配置为2.

Does anyone have any idea where it is configured this way?有谁知道它在哪里配置这种方式?

Edit: The question: How can I customize the tab-to-space conversion factor?编辑:问题: 如何自定义制表符到空格的转换系数? does not help to answer my question as I've already tried those steps.无助于回答我的问题,因为我已经尝试过这些步骤。 The issue here is something is overriding the settings in VSCode for the flutter project and I can't seem to figure out what it is.这里的问题是某些东西覆盖了 VSCode 中 flutter 项目的设置,我似乎无法弄清楚它是什么。

As an update to this.作为对此的更新。 I was digging around in the dart/flutter documentation and I found out that the formatter for dart code was deliberately made so that it wasn't configurable so there is nothing I can do here.我在 dart/flutter 文档中挖掘,我发现 dart 代码的格式化程序是故意制作的,因此它不可配置,所以我在这里无能为力。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM