Improve text-selection/cursor behavior with inline code minings
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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?
- Lenguaje dominante
- Java
- Estrellas
- 124
- Forks
- 269
- Merge medio
- 1 d 19 h
- PR fusionados (30 d)
- 60
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de eclipse-platform/eclipse.platform.ui
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
eclipse-platform/eclipse.platform.ui#4476 · 5 comentarios ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
eclipse-platform/eclipse.platform.ui#4125 · 4 comentarios ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
eclipse-platform/eclipse.platform.ui#4016 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
eclipse-platform/eclipse.platform.ui#3892 · 4 comentarios ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
eclipse-platform/eclipse.platform.ui#2687 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de eclipse-platform/eclipse.platform.ui
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
apache/rocketmq-dashboard#6331 ·
Los mantenedores suelen responder en 5 días
-
Upgrade to Commons Codec 1.23.0Abiertostatus: team-only type: dependency-upgrade
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
spring-projects/spring-boot#52143 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
area/frontend good first issue kind/cooldown
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
kestra-io/kestra#20704 · 1 comentario ·
Los mantenedores suelen responder en 1 día