LuaLS / LuaLS/lua-language-server

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

Đang mở
#2,281 1 bình luận 4 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

bug
Ngôn ngữ chính
Lua
Star
4.4k
Fork
442
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu bằng cách tái tạo đầu vào của addon/library/config.json và so sánh với .vscode/settings.json được tạo. Theo dõi việc chuyển các thiết lập của addon cho Lua.runtime.nonstandardSymbol, sau đó xác minh rằng tất cả các phần tử của mảng đều được giữ nguyên trong đầu ra thiết lập workspace.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
lua, vscode
Lĩnh vực
tooling
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.