Add completion possibilities that split the current token
- Lingua principale
- Haskell
- Stelle
- 1.3k
- Fork
- 201
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Consider the following (where the vertical line represents the cursor position):
program = dr|codeWorldLogo
Triggering autocomplete will now try to match the entire token, `drcodeWorldLogo`. Autocomplete will decide that `drawingOf` is the best suggestion by far, and turn the whole thing into `drawingOf`. The `codeWorldLogo` is lost.
Instead, auto-complete should be willing to also consider splitting the token into `dr` (before the cursor) and `codeWorldLogo` at the end. If they are BOTH close to existing tokens, then autocomplete should potentially replace the `dr` with `drawingOf`, and leave `codeWorldLogo` alone. The decision about whether to split the current token or not should be made based on the edit distance to turn the portion after the cursor into a known token, as compared to the edit cost of deleting it after this completion, possibly with some weighting in favor of one or the other choice.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Nell’issue non sono indicati file di implementazione né test. Inizia individuando il codice di autocomplete che corrisponde al token corrente e alla relativa logica della distanza di edit, quindi segui il modo in cui il cursore divide il token. Il lavoro è completato quando autocomplete può confrontare la sostituzione dell’intero token con la divisione prima del cursore, preservare un suffisso valido e scegliere in modo coerente tra le alternative.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- haskell
- Ambito
- developer-experience
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100