Triggering a code action with empty range

Aperta
#38 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Python
Stelle
145
Fork
8
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di python-rope/pylsp-rope

Tutte le issue di python-rope/pylsp-rope

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.