LuaLS / LuaLS/lua-language-server

Operators are not included in the output when generating documentation via the --doc CLI argument

Đang mở
#3,194 1 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?

Command Line

Which OS are you using?

Linux

What is the issue affecting?

Annotations, Other

Expected Behaviour

When generating markdown and JSON documentation via the command line argument --doc, the output files should contain operators defined by the @operator syntax.

Actual Behaviour

The expected behavior is that the operators are missing in both the markdown and JSON generated files.

Reproduction steps

Given the following Lua file:

---@meta

---@class Vector2f
---@operator unm:Vector2f
---@operator add(Vector2f | number):Vector2f
---@operator sub(Vector2f | number):Vector2f
Vector2f = {}

When the language server is run with the following args:

./LuaS/bin/lua-language-server --doc=./example.lua --doc_out_path=.

Then the output doc.md and doc.json do not contain any of the operators specified.

In the doc.json the type Vector2d is the following, notice the lack of any operators:

{
    "defines": [
        {
            "async": false,
            "deprecated": false,
            "file": ".",
            "finish": [
                2,
                18
            ],
            "start": [
                2,
                10
            ],
            "type": "doc.class",
            "view": "Vector2f",
            "visible": "public"
        }
    ],
    "fields": [],
    "name": "Vector2f",
    "type": "type",
    "view": "Vector2f"
}
Additional Notes

No response

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

Bắt đầu từ điểm vào CLI --doc và theo dõi cách đầu vào example.lua được chuyển đổi thành doc.mddoc.json. Tái hiện vấn đề với ví dụ Vector2f được cung cấp, sau đó xác minh rằng cả hai tệp được tạo đều bao gồm các định nghĩa @operator.

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
cli, documentation
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 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
45/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.