LuaLS / LuaLS/lua-language-server

@see attribute and lua:// links not exposed in exported json

Aperta
#3,026 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?

Visual Studio Code Extension (sumneko.lua)

### Which OS are you using?

Linux

### What is the issue affecting?

Other

### Expected Behaviour

`@see` attribute data and `lua://` links are written to the exported json documentation. Preferably being easily readable and containing the raw data to enable linking between different parts of a generated html documentation site.

### Actual Behaviour

The `@see` attribute and `lua://` links are transformed to raw markdown links that link directly to the source code using an absolute path.

### Reproduction steps

1. Make a new lua file.
2. Add two functions:
```lua
function foo() end
--- @see foo
--- This function links to [`foo`](lua://foo)
function bar() end
```
3. Export the documentation to json
4. Observe the attribute and markdown link having been replaced with:
```md
[`foo`]({path}#{location})
See: [foo]({path}#{location})
```

### Additional Notes

I have been working on definition files for CC:T, and having been using the `@see` attribute and `lua://` links as equivalents for the current links on https://tweaked.cc .
However, after trying to actually export the declarations, I've noticed that all links point directly towards absolute paths on disk. This is fine (or even needed) for editors to work, but it's undesirable for markdown output, and even worse for json.
If this method of exporting is intended to allow for things like generating static html pages, this information should be exposed better to allow for this.

### 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

Riproduci il problema definendo foo e bar con gli esempi mostrati di @see e lua://, quindi esporta la documentazione in JSON. Ispeziona il percorso di esportazione che converte questi link in percorsi sorgente assoluti. Il lavoro è completato quando il JSON conserva dati @see leggibili e le informazioni grezze dei link lua:// adatte al collegamento nell’HTML generato.

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

Valutazione

Stack tecnologico
lua
Ambito
documentation
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.