LuaLS / LuaLS/lua-language-server

Documentation export is missing information

Aperta
#2,322 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

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?

Command Line

Which OS are you using?

Windows

What is the issue affecting?

Other

Expected Behaviour

After generating documentation with --doc, I expected to have access to the all of the information available in the annotations that is presented or used by the language server.

Actual Behaviour

There were a few things that are missing or strange:

  • @see annotations are absent.
  • Access levels (@protected, @private, @package) are absent.
  • Aliases that extend other aliases include the documentation of the alias that they extend, which makes it difficult to tell which documentation belongs to only the extended alias.
  • The start and finish fields seem odd; they're very large numbers (e.g., 5490009, 5490021) that clearly don't refer to character ranges within the files. What are these numbers?

For the purpose of generating documentation, the first two problems seem significant—it would be difficult to filter out private fields and methods, for example.

Reproduction steps
  1. Create a Lua file that uses access modifiers, @see, and an alias that extends another alias. I've provided a minimal example of such a file below.
  2. Observe the missing data and oddities.
Additional Notes

Example for reproduction:

---@class C
---@field private z integer
local C = {}

---Base alias doc comment.
---@alias Base
---| 'A'
---| 'B'

---Extended alias doc comment.
---@alias Derived
---| Base
---| 'C'

---@protected
function C.x()
end

---@see C.x
function C.y()
end
Log File

No response

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia eseguendo l’esportazione --doc sulla riproduzione in Lua presente nell’issue e verifica come il suo output rappresenta @see, i modificatori di accesso, la documentazione degli alias ereditata e start/finish. Segui il punto di ingresso dell’esportazione della documentazione e confronta il suo output con le informazioni sulle annotazioni utilizzate dal server del linguaggio. Il lavoro è completato quando i dati esportati conservano i dettagli delle annotazioni richiesti e spiegano o correggono i valori dell’intervallo.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
lua
Ambito
documentation, tooling
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.