LuaLS / LuaLS/lua-language-server

`Lua.runtime.nonstandardSymbol` value not being properly copied from addon `config.json` to workspace `.vscode/settings.json`.

未关闭
#2,281 1 条评论 4 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

bug
主要语言
Lua
星标
4.4k
派生
442
PR 合并指标
30 天内没有已合并 PR

描述

How are you using the lua-language-server?

Visual Studio Code Extension (sumneko.lua)

Which OS are you using?

Windows

What is the issue affecting?

Libraries

Expected Behaviour

Lua.runtime.nonstandardSymbol from addon's config.json should be correctly copied to .vscode/settings.json.

Actual Behaviour

Only the LAST element of the addon's Lua.runtime.nonstandardSymbol array is being copied to .vscode/settings.json Lua.runtime.nonstandardSymbol array.

Example:

Input addon/library/config.json:

{
    "name": "BWLua",
    "words": ["--bwlua"],
    "settings": {
        "Lua.runtime.version": "Lua 5.1",
        "Lua.runtime.special": {},
        "Lua.runtime.builtin": {
            "os": "disable",
            "package": "disable",
            "io": "disable",
            "utf8": "disable",
            "jit": "disable",
            "debug": "disable",
            "coroutine": "disable"
        },
        "Lua.runtime.nonstandardSymbol": ["`", "+=", "-=", "*=", "/=", "^=", "continue"]
    }
}

Output .vscode/settings.json

{
    "Lua.runtime.nonstandardSymbol": [
        "continue"
    ],
    "Lua.runtime.builtin": {
        "io": "disable",
        "utf8": "disable",
        "debug": "disable",
        "coroutine": "disable",
        "package": "disable",
        "os": "disable",
        "jit": "disable"
    },
    "Lua.runtime.version": "Lua 5.1",
    "Lua.workspace.library": [
        ".../LuaAddons/bwlua-language-addon/library"
    ]
}

Expected "Lua.runtime.nonstandardSymbol" value is: ["`", "+=", "-=", "*=", "/=", "^=", "continue"]

Reproduction steps
  1. Create an addon config at addon/library/config.json where "Lua.runtime.nonstandardSymbol" has an array with >1 entries.
  2. Enable addon in new workspace.
  3. Observe .vscode/settings.json.
Additional Notes

No response

Log File

No response

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先重现 addon/library/config.json 的输入,并将其与生成的 .vscode/settings.json 进行比较。跟踪 Lua.runtime.nonstandardSymbol 的 addon 设置传递,然后验证数组中的所有条目都保留在工作区设置输出中。

由索引模型根据 Issue 内容生成。

评估

技术栈
lua, vscode
领域
tooling
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。