LuaLS / LuaLS/lua-language-server

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

Đang mở
#3,026 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
Lua
Star
4.4k
Fork
442
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Tái hiện vấn đề bằng cách định nghĩa foo và bar với các ví dụ @see và lua:// đã cho, sau đó xuất tài liệu sang JSON. Kiểm tra đường dẫn xuất chuyển đổi các liên kết này thành các đường dẫn nguồn tuyệt đối. Hoàn thành khi JSON giữ lại dữ liệu @see dễ đọc và thông tin liên kết lua:// thô, phù hợp để tạo liên kết trong HTML được sinh ra.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
lua
Lĩnh vực
documentation
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.