Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
CelDaemon opened this issue Jan 4, 2025 · 0 comments
Open

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

CelDaemon opened this issue Jan 4, 2025 · 0 comments

Comments

@CelDaemon
Copy link

CelDaemon commented Jan 4, 2025

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:
function foo() end
--- @see foo
--- This function links to [`foo`](lua://foo)
function bar() end
  1. Export the documentation to json
  2. Observe the attribute and markdown link having been replaced with:
[`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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant