lua-language-server icon indicating copy to clipboard operation
lua-language-server copied to clipboard

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

Open Rob-bie opened this issue 2 years ago • 1 comments

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

Rob-bie avatar Aug 21 '23 01:08 Rob-bie