Skip to content

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

Open
@Rob-bie

Description

@Rob-bie

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions