LuaLS / LuaLS/lua-language-server

Lines in annotations don't appear in order as written

Đang mở
#2,389 3 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ả

Hey!

Descriptions, comment lines don't appear in order as written under any specified @param and @return description, they are displayed in bulk at the bottom. Also, the main function6object descriptions from the top line are also displayed below param and return value descriptions.

I've been using an older version of the extension (2.6.8), I updated it to see if issues I had with newer versions had been resolved since. Mostly, yes they have been and it works much faster than before so I'd like to stay - but the way I've been annotating stuff, it is a really annoying yet simple issue.

Here's an example (the detailed annotations of a function that gets and returns color values, unpacking them from the table provided):

---Returns the position values used by [Region:SetPoint(...)](https://wowpedia.fandom.com/wiki/API_ScriptRegionResizing_SetPoint) from a position table used by WidgetTools
---@param t? table Table containing parameters to call [Region:SetPoint(...)](https://wowpedia.fandom.com/wiki/API_ScriptRegionResizing_SetPoint) with
--- - **anchor**? [AnchorPoint](https://wowpedia.fandom.com/wiki/Anchors) *optional* — ***Default:*** "TOPLEFT"
--- - **relativeTo**? [Frame](https://wowpedia.fandom.com/wiki/API_CreateFrame#Frame_types)|string *optional* ― Frame reference or name | ***Default:*** UIParent if **t.relativePoint** ~= nil
--- - **relativePoint**? [AnchorPoint](https://wowpedia.fandom.com/wiki/Anchors) *optional* — ***Default:*** **t.anchor** if **t.relativeTo** ~= nil
--- - **offset**? table *optional*
--- 	- **x**? number *optional* — ***Default:*** 0
--- 	- **y**? number *optional* — ***Default:*** 0
---@return AnchorPoint anchor ***Default:*** "TOPLEFT"
--- - ***Note:*** Default to "TOPLEFT" when an invalid input is provided.
---@return Frame|nil? relativeTo ***Default:*** UIParent if **t.relativePoint** ~= nil
---@return AnchorPoint|nil? relativePoint ***Default:*** **t.anchor** if **t.relativeTo** ~= nil
---@return number? offsetX ***Default:*** 0
---@return number? offsetY ***Default:*** 0

I expect the entire text to appear as such (as it used to with the old extension version I've been using) when mousing over the function:
image

However, now it appears like so:
image

If it is the intended way of displaying annotations, that's fine - I assume some people prefer it this way but I do prefer and expect it to be displayed as it used to be, all lines rendered in order as written. If this is the case, please add a setting so everyone can specify the annotation rendering behavior to meet their preference.

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 bằng cách tái hiện đầu ra hover với ví dụ chú thích Lua được cung cấp và so sánh với thứ tự nguồn dự kiến. Truy vết đường đi kết xuất hover của chú thích, sau đó xác định xem việc giữ nguyên thứ tự hay thêm một thiết lập kết xuất có phù hợp với hành vi hiện tại hay không. Hoàn tất khi các dòng được hiển thị khớp với thứ tự được yêu cầu, mọi thiết lập mới đều được ghi lại trong tài liệu và được bao phủ bởi một regression test.

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
tooling
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.