防止工作区默认设置在VS代码中覆盖手动输入的用户设置

发布于 2025-02-12 03:56:18 字数 830 浏览 2 评论 0原文

如果总是有工作区设置,我该如何使用VS代码中的用户设置?

我正在使用一个项目目录。我正在使用VS代码工作,但是其他团队成员使用不同的IDE与目录一起使用。因此,我们不允许添加任何特定于IDE的文件夹(例如.vscode文件夹)。这实际上意味着该项目没有VS代码工作区设置。但是,每当我进入设置时,我仍然可以看到工作区选项卡。

我尝试更新用户中的prettier.tabwidth属性为4,而在工作空间中,它是2,而仍然是VS代码使用该值工作空间即使没有工作空间文件,该值仅仅是默认值。而且我无法更改工作区设置,从那以后,工作区设置文件将添加到项目中。

因此,基本上,默认工作区设置覆盖了手动放置用户设置。这实际上令人沮丧,因为它使用户设置毫无用处。

例如,我有什么办法可以将prettier.tabwidth设置为 4 而无需将工作区设置文件添加到项目中?

”在此处输入图像说明”

How could I use User settings inside VS Code if there are always Workspace settings?

I am working with a project directory. I am working using VS Code, but other team members use different IDEs to work with the directory. So, we are not allowed to add any IDE specific folders (e.g. the .vscode folder). That means in reality the project has no VS Code Workspace settings. But whenever I go to the Settings I still can see that Workspace tab.

I tried to update the prettier.tabWidth property in User to be 4, while in Workspace it is 2 and still VS Code uses the value from Workspace even though there are no Workspace files and the value is merely default. And I can not change the Workspace settings, since then the Workspace settings file will get added to the project.

So, basically the default Workspace settings override the manually put User settings. That is depressing actually since it makes User settings useless.

E.g. is there any way for me to set the prettier.tabWidth to 4 without adding Workspace settings files to the project?

enter image description here

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文