Improve text-selection/cursor behavior with inline code minings
Maintainer thường phản hồi trong vòng 1 ngày
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
- 35/100
Hướng nghiên cứu
The issue does not identify files or tests; start by tracing how inline code minings affect editor cursor positions and text selection. Reproduce the two examples with code minings enabled and compare the behavior with the expected placement and selection described here. Done means the cursor can be placed on either side of a mining and selections can include or exclude it without losing adjacent characters.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I often use Editors which make use of inline code minings, for example in JDT or LSP4E.
However, I often find myself in a situation, where I think that code minings lead to unintuitive text-selection and cursor behavior.
Example 1 (Cursor Placement):
public class Foo {
public static void bar(final String someReallyLongArgument) {
//
}
public static void bar(final String anotherArgument, final String someReallyLongArgument) {
//
}
}
I'm calling this function somewhere and with code minings it is rendered as:
bar(someReallyLongArgument: "abc");
Now I want to switch to the overloaded version of the same method. To do so, I have to add an argument at the first position. Intuitively, I want to position my cursor between bar( and someR..., but I cant. Instead I have to place the cursor after someReallyLongArgument: , which feels really unintuitive.
Example 2 (Text Selection):
Consider the following Python Code used with LSP4E:
foobar = [1, "test"]
Using a Python LS with type inference, such as basedpyright, we get the following code, were the added text is a code mining representing an inlay hint from the LS:
foobar: list[int | str] = [1, "test"]
Now, If I want to select the variable "foobar" by holding down my left mouse button and moving the mouse, I can at most select "fooba", the remaining character is only included in the selection when I move the mouse further to the right to also include the code mining : list[int | str].
Here is a small video of that situation:
https://github.com/user-attachments/assets/eaddb82d-cdcf-4593-a45c-052b425f9629
In VS Code, neither of the above problems are present, i.e.,
- I can place the cursor directly before or after a code mining, even though that's the same offset in the underlying document
- I can create a text selection including or excluding a code mining, even though the content of the text selection is the same.
I haven't looked at the relevant code, but I'm assuming the underlying problem is that the code minings are fused with the preceding characters to have a unique mapping between document offsets and cursor positions in the document?
- Ngôn ngữ chính
- Java
- Star
- 124
- Fork
- 269
- Merge trung bình
- 1 ngày 19 giờ
- Pull request đã merge (30 ngày)
- 60
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc 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 eclipse-platform/eclipse.platform.ui
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
eclipse-platform/eclipse.platform.ui#4476 · 5 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
eclipse-platform/eclipse.platform.ui#4125 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
eclipse-platform/eclipse.platform.ui#4016 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
eclipse-platform/eclipse.platform.ui#3892 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
eclipse-platform/eclipse.platform.ui#2687 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của eclipse-platform/eclipse.platform.ui
Issue tương tự
-
[BUG] 增量 SSE 解析器未识别单独 CR 换行,导致事件无法及时交付Có thể đã có người làm @king-wwwhhh đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
langchain4j/langchain4j#6669 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
OpenAPITools/openapi-generator#25237 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-area-label
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
quelea-projection/Quelea#711 ·
-
bug pdd
Độ khó 2/5 Dưới một giờ Mức phù hợp với người mới 67/100
objectionary/eo#9450 ·
Maintainer thường phản hồi trong vòng 1 ngày