LuaLS / LuaLS/lua-language-server
Remove continuous empty lines
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?
Formatting
Expected Behaviour
continuous empty lines should be removed
Actual Behaviour
nothing happen?
Reproduction steps
- Go to lua source file
- Add continuous empty lines
- Click save to
Formatthe code
Additional Notes
I have the following vscode setting.json file:
{
"Lua.format.defaultConfig": {
"indent_style": "tab",
"indent_size": "4",
"max_line_length": "80",
"max_continuous_line_distance": "1",
},
}
Log File
[21:31:44.449][info] [#0:/home/wahabz/.vscode/extensions/sumneko.lua-3.6.2-linux-x64/server/main.lua:65]: Lua Lsp startup, root: /home/wahabz/.vscode/extensions/sumneko.lua-3.6.2-linux-x64/server
[21:31:44.450][info] [#0:/home/wahabz/.vscode/extensions/sumneko.lua-3.6.2-linux-x64/server/main.lua:66]: ROOT: /home/wahabz/.vscode/extensions/sumneko.lua-3.6.2-linux-x64/server
[21:31:44.450][info] [#0:/home/wahabz/.vscode/extensions/sumneko.lua-3.6.2-linux-x64/server/main.lua:67]: LOGPATH: /home/wahabz/.vscode/extensions/sumneko.lua-3.6.2-linux-x64/server/log
[21:31:44.450][info] [#0:/home/wahabz/.vscode/extensions/sumneko.lua-3.6.2-linux-x64/server/main.lua:68]: METAPATH: /home/wahabz/.vscode/extensions/sumneko.lua-3.6.2-linux-x64/server/meta
[21:31:44.450][info] [#0:/home/wahabz/.vscode/extensions/sumneko.lua-3.6.2-linux-x64/server/main.lua:69]: VERSION: 3.6.2
[21:31:44.520][info] [#0:script/service/service.lua:141]:
========= Medical Examination Report =========
--------------- Memory ---------------
Total: 1.545 MB
00 : 1.545 MB
01 : 0.000 MB
02 : 0.000 MB
03 : 0.000 MB
04 : 0.000 MB
--------------- Coroutine ---------------
Total: 0
Running: 0
Suspended: 0
Normal: 0
Dead: 0
--------------- Cache ---------------
Total: 1
Dead: 0
--------------- RPC ---------------
Holdon: 0
Waiting: 0
[21:31:44.531][info] [#0:script/language.lua:137]: VSC language: en-us
[21:31:44.531][info] [#0:script/language.lua:138]: LS language: en-us
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 hành vi của formatter trong một tệp nguồn Lua bằng cách sử dụng thiết lập VS Code được báo cáo, đặc biệt là max_continuous_line_distance. Bắt đầu bằng cách lần theo điểm vào của quá trình format được sử dụng khi lưu và xác định các bài kiểm thử của formatter, sau đó xác minh rằng việc format loại bỏ các dòng trống liên tiếp trong khi vẫn tuân theo khoảng cách tối đa đã cấu hình.
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, vscode
- 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
- 45/100