LuaLS / LuaLS/lua-language-server
Support enums within tables
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
This may have to be a follow-up of https://github.com/sumneko/lua-language-server/issues/1411 but I have created this as a separate issue for separate feedback & tracking purposes
It would be nice if we could have enum function argument suggestions based on where the enumerator is defined. Currently, if you have an enum nested within some tables, it will only suggest the enum values as such:

This is fine if using the values defined directly is not an issue. However, if the enum values are runtime values (as mentioned in issue https://github.com/sumneko/lua-language-server/issues/1411) then we'd like to have some sort of initial auto-complete as such:

I am not sure how expensive computationally it may be to do this, if that is an issue then perhaps there exists a cheap workaround that could be used for documenting purposes.
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
Leggi l’issue #1411 insieme a questa issue per comprendere la limitazione di runtime-value e il contesto di follow-up richiesto. Usa gli esempi e gli screenshot dei nested-table enum come riferimento comportamentale. Il lavoro è completo quando il completamento degli argomenti delle funzioni può suggerire valori enum in base al punto in cui è definito l’enumeratore, inclusi gli enum annidati nelle tabelle.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- lua
- Ambito
- devtools
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100