LuaLS / LuaLS/lua-language-server
Irritating Markdown syntax for headings conflicts with traditional comment frames in Lua
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?
Annotations
Expected Behaviour
"Hello World!" in the following annotation is NOT treated as a heading:
--------------------------------------------------------------------------------
--- Hello World!
--------------------------------------------------------------------------------
local function Main() end
Actual Behaviour
"Hello World!" shows as a heading in the documentation pop-up window like so.
Reproduction steps
Type the following code and hover your mouse over the function name.
--------------------------------------------------------------------------------
--- Hello World!
--------------------------------------------------------------------------------
local function Main() end
Additional Notes
As someone who likes to frame documentation comments, I find this issue unbearable. The reason we should except Markdown's dash ---- syntax for headings in LuaCATS is because Lua uses dashes to delimit the comments themselves. And those who frame comments also use the same character (dash) for the rest of the frame. You wouldn't use another character for the frame, it would look ugly and not uniform. For example, in C, Markdown's heading syntax does not conflict with the comment delimiter (//). So you can frame your comments by repeating the comment delimiter itself for a uniform frame.
Log File
Log files have no use in this issue.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Tái hiện sự cố trong extension Visual Studio Code bằng cách di con trỏ lên hàm trong chú thích Lua được đóng khung hiển thị trong báo cáo. Trước tiên, hãy tìm phần xử lý heading Markdown của LuaCATS được dùng cho tài liệu chú thích, sau đó xác minh rằng văn bản “Hello World!” được đóng khung không còn được render dưới dạng heading, trong khi các heading Markdown thông thường vẫn hoạt động.
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ó
- 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
- 35/100