Triggering a code action with empty range

Abierto
#38 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
45/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
python

Línea de trabajo

Read the code action handling entry point in pylsp-rope and trace how the requested range is passed to Rope; the issue does not name a file or test. Reproduce the empty range case with Neovim, compare it with a cursor-to-end-of-line range, and add a regression test for the intended behavior.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

There is one usability issue with Neovim's implementation of code action. If you hadn't selected a range, Neovim's code action would trigger the code action with an empty range (start position = end position = cursor position) while other Vim lsp clients would send a range between the current cursor position to the end of line. This means that triggering a code action with nothing selected is always going to fail in Neovim LSP.

AFAIK, neither of these behavior are specified in the LSP spec itself so they're both reasonable behavior for clients to do, but this is an issue that can be fixed on our side.

Lenguaje dominante
Python
Estrellas
145
Forks
8
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de python-rope/pylsp-rope

Todos los issues de python-rope/pylsp-rope

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.