LuaLS / LuaLS/lua-language-server
[Feature Request] Named Environment/Configuration Selection
Nessuno ha ancora preso questa issue.
- Lingua principale
- Lua
- Stelle
- 4.4k
- Fork
- 442
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Non è indicato alcun file di implementazione né alcun test. Inizia esaminando la documentazione sulla configurazione e la discussione 1834 per capire come le definizioni condizionali potrebbero essere selezionate da una configurazione denominata; il lavoro sarebbe completato quando gli utenti potessero cambiare configurazione e vedere solo le definizioni corrispondenti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- lua, vscode
- Ambito
- tooling
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100