LuaLS / LuaLS/lua-language-server
[Feature Request] Named Environment/Configuration Selection
まだ誰も着手していません。
- 主要言語
- 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
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:
```lua
---@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
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
実装ファイルもテストも指定されていません。まず設定ドキュメントとディスカッション 1834 を確認し、名前付き設定によって条件付き定義を選択する方法を理解してください。完了の条件は、ユーザーが設定を切り替え、対応する定義だけを表示できることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- lua, vscode
- 領域
- tooling
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100