LuaLS / LuaLS/lua-language-server
Incorrect folding range when a function with an inline comment follows an annotation
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?
Windows
What is the issue affecting?
Formatting
Expected Behaviour
The folding chevron will be next to the function declaration and will fold the function.
Actual Behaviour
The folding chevron is next to the annotation and will only fold the one line of the function, leaving the rest of the function unfolded.
Reproduction steps
This code reproduces it:
---@param bar integer function foo(bar) -- comment local whee = bar + 3 return whee end
Additional Notes
Removing the inline comment fixes it.
Putting a blank line between the annotation and the function declaration line, even if it still has the inline comment, fixes it.
Log File
I couldn't get the thing to upload it, I'm sorry :(
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
Bắt đầu bằng cách tái hiện hành vi folding với đoạn Lua trong issue, so sánh với các biến thể loại bỏ chú thích inline hoặc thêm một dòng trống. Theo dõi cách xử lý folding-range cho một annotation theo sau bởi một khai báo hàm. Hoàn tất khi chevron folding nằm bên cạnh khai báo hàm và fold toàn bộ phần thân hàm.
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ó
- 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