LuaLS / LuaLS/lua-language-server

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

Offen
#3,026 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
Lua
Sterne
4.4k
Forks
442
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Reproduziere das Problem, indem du foo und bar mit den gezeigten @see- und lua://-Beispielen definierst, und exportiere anschließend die Dokumentation nach JSON. Untersuche den Exportpfad, der diese Links in absolute Quellpfade umwandelt. Erledigt ist die Aufgabe, wenn das JSON lesbare @see-Daten und rohe lua://-Linkinformationen beibehält, die für die Verknüpfung in generiertem HTML geeignet sind.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
lua
Bereich
documentation
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.