LuaLS / LuaLS/lua-language-server
[Feature Request] Named Environment/Configuration Selection
Chưa có ai nhận issue này.
- 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
Not sure how best to word the title, but essentially, having different configuration names that the user can swap between would be nice. This is probably a really unlikely needed thing, but it's something I would need for my meta information.
Actual Behaviour
You can't specify some kind of named configuration.
Reproduction steps
N/A
Additional Notes
If you see https://github.com/LuaLS/lua-language-server/discussions/1834, I want to be able to differentiate between when certain functions exist/overload. The problem is that I can't really do that as-is, that I can tell at least. One thing I tried to look into were the configuration file details, but there's not a lot of documentation.
Ideally, I would be able to let the user specify how one of my variables is defined, e.g. love._console_name in my case would be 3DS, Switch or Wii U. I could then do something like so:
---@meta
---
---Provides access to information about the user's system.
---
---
---[Open in Browser](https://love2d.org/wiki/love.system)
---
---@class love.system
love.system = {}
if love._console_name == "3DS" then
local play_coins = 0
---Set the Play Coin count. \
---This function is **ONLY** available on _Nintendo 3DS_.
---@param coins integer
function love.system.setPlayCoins(coins)
play_coins = coins
end
---Get the Play Coin count. \
---This function is **ONLY** available on _Nintendo 3DS_.
---@return integer current_coins
function love.system.getPlayCoins()
return play_coins
end
end
return love.system
and it would only show these as defined when on a "3DS" configuration.
The C++ Visual Studio Code extension has something similar:

Log File
N/A
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Không có tệp triển khai hoặc bài kiểm thử nào được nêu. Hãy bắt đầu bằng cách xem lại tài liệu cấu hình và cuộc thảo luận 1834 để hiểu cách các định nghĩa có điều kiện có thể được chọn bằng một cấu hình được đặt tên; công việc được xem là hoàn tất khi người dùng có thể chuyển đổi giữa các cấu hình và chỉ thấy các định nghĩa phù hợp.
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
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100