"Expand Selection" doesn't expand to strings or scopes
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 65/100
Hướng nghiên cứu
Bắt đầu bằng cách xác định phần triển khai của Expand Selection và mọi bài kiểm thử bao quát việc mở rộng vùng chọn; issue không nêu tên các tệp hoặc điểm vào cụ thể. Tái hiện các ví dụ về chuỗi Lua, phạm vi hàm và Object.property, sau đó bổ sung coverage cho thấy các lần mở rộng liên tiếp chọn đúng các cấu trúc mong đợi.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I use VScode's "Expand Selection" command a lot to copy strings around, but when I try to use it on Lua strings, it expands the selection a lot more than just the string I'm on.
Actual behavior
Suppose my cursor is inside the word example:
hs.alert(prefix .. " an exam
|ple string " .. suffix)
1st call to Expand Selection selects the word:
hs.alert(prefix .. " an
examplestring " .. suffix)
2nd call to Expand Selection selects everything between () instead of the full string:
hs.alert(
prefix .. " an example string " .. suffix)
Expected behavior
2nd call to Expand Selection should select just the string:
hs.alert(prefix ..
" an example string ".. suffix)
In JavaScript, I noticed it even has two steps for the string, the inner part of the string, then the outer:
alert(prefix + " an
examplestring " + suffix)
alert(prefix + "
an example string" + suffix)
alert(prefix +
" an example string "+ suffix)
That would also work!
Similar scenarios
Scopes are also currently skipped:
local myFunction = function () ret
|urn true end
local myFunction = function ()
returntrue end <- 1st call selects the word
local myFunction =
function () return true end<- expected: 2nd call selects the function scope
local myFunction = function () return true end<- actual: 2nd call selects the line instead
Same for Object.property:
Object.
property= true
Object.property= true <- expected
Object.property = true<- actual
- Ngôn ngữ chính
- Lua
- Star
- 4.4k
- Fork
- 442
- Merge trung bình
- 8 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 1
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.
Issue khác của LuaLS/lua-language-server
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
LuaLS/lua-language-server#1776 ·
-
泛型for迭代器的类型推导漏掉了带__call的类 Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 65/100
LuaLS/lua-language-server#3463 · 5 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
LuaLS/lua-language-server#3461 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
LuaLS/lua-language-server#3460 · 1 bình luận · 1 reaction ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
LuaLS/lua-language-server#3459 · 1 reaction ·
Tất cả issue của LuaLS/lua-language-server
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
LandSandBoat/server#11579 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
ArchiveTeam/sinavideo-grab#7 · 3 reaction ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
mailcow/mailcow-dockerized#7480 ·
-
Mapper: a failed area image export crashes Mudlet if the profile closed while it was running Đang mởmapper bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
documentation feature-request mini.completion
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100