VS代码自动包装LUA代码在格式化时禁用AURO包装

发布于 2025-02-09 12:25:43 字数 972 浏览 0 评论 0原文

我对VSC遇到了一个奇怪的问题,因为几天前,即使自动包裹它的残疾人,VSC最多一周就开始自动包装大线条,而且我没有安装任何包装物品的插件。 检查了我的配置以及所有相关的自动包装和包装与包装的设置都被禁用,任何帮助都非常感谢,因为我使用了大量的自动格式,并且硬包裹杀死了我。

这是包裹的示例行:

local canPlace = af.chekValidPosition(context.user_id, dbDump[1].value.buildings, json.orientation.x, json.orientation.y, buildInformation.size.x, buildInformation.size.y, layoutToUse)

最终是这样的:

local canPlace = af.chekValidPosition(context.user_id, dbDump[1].value.buildings, json.orientation.x,
        json.orientation.y, buildInformation.size.x, buildInformation.size.y, layoutToUse)

这是我使用的完整列表,以防万一我缺少某些内容。

  • c/c ++
  • c#
  • docker
  • go
  • lua lua
  • debug
  • peacock
  • powershell
  • 遥控器 -

要添加的容器,Lua扩展名似乎是引起此问题的一个。

我会发现此错误检查该扩展程序的配置:

Lua › Format: Default Config
%config.format.defaultConfig%
Incorrect type. Expected an object.

Im having a strange issue with VSC, since some days ago, a week at most, VSC started to auto wrap large lines, even when auto wrap its disabled and I dont have any plugin installed that wrap stuff.
Checked my configs and all auto wrap and wrap related settings are disabled, any help its really appreciated since I use a lot of auto format and the hard wrapping its killing me.

Here is an example line that gets wrapped:

local canPlace = af.chekValidPosition(context.user_id, dbDump[1].value.buildings, json.orientation.x, json.orientation.y, buildInformation.size.x, buildInformation.size.y, layoutToUse)

It ends up like this:

local canPlace = af.chekValidPosition(context.user_id, dbDump[1].value.buildings, json.orientation.x,
        json.orientation.y, buildInformation.size.x, buildInformation.size.y, layoutToUse)

This is the full list of extensions I use, just in case Im missing something.

  • C/C++
  • C#
  • Docker
  • Go
  • Lua
  • Lua Debug
  • Peacock
  • PowerShell
  • Remote - Containers

To add to this, the Lua extension seems to be the one causing this issue.

I get this error checking the configuration for that extension:

Lua › Format: Default Config
%config.format.defaultConfig%
Incorrect type. Expected an object.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

暖树树初阳… 2025-02-16 12:25:43

对于与Sumneko的Lua插件相同问题的任何人,您需要在项目的根部添加EditorConfig文件,或添加Max_line_length参数并设置一个新值,默认值为120。

For anyone having this same issue with sumneko's Lua plugin, you need to either add a editorconfig file to your project's root or add the max_line_length parameter and set a new value, default one its 120.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文