redhat-developer / redhat-developer/vscode-java
auto completion inserting already-existing text ("overwrite" to the right)
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 2.3k
- Fork
- 546
- Merge medio
- 20h 1m
- PR unite (30g)
- 11
Descrizione
code completion unnecessarily not "overwriting" to the right (Java specific? language specific fixes with compile-check "smarter" "smart" acceptSuggestion possible)
TLDR; just look below at image attachments (step 1, 2, 3)
at the basic, this isn't language specific, but language enhancements possible
"overwriting" or "contextual insert" or "surrounding check" or "duplicate surround text" might be a better term
Not sure where to file this at the "editor." level
filing in vscode-java for language specific completion enhancement ability (less so for compile check, mores to not overwrite text that is suppose to be repeated, but ymmv)
discussion
fixes would include:
- just don't write duplicate text
- a property with options (as its possibly "destructive", though I'd prefer the "destructive" option here)
- language specific fix (bonus: detect which actually compiles)
between image 2 and image 3, both [tab] and [enter] seem to have the same results, so maybe this could be considered in configuration (on tab, check/replace same surrounding text, on enter just insert)
tried following settings, no difference observed:
"editor.acceptSuggestionOnEnter": "smart",
"editor.acceptSuggestionOnEnter": "on",
wanted:
"editor.acceptSuggestionOnEnter": "overwrite" or ("replacesame"),
"java.completion.acceptReplaceMode": "compile"
or
"editor.acceptSuggestionSurroundMode": {
"replaceSame": ,
}
Also, separately, but not,
editor.suggestisn't ordering by preexisting surround text- language-specific e.g.
"java.completion.orderByPriorityStaticMode": "preexisting"surround check could handle ordering better - bonus language-specific e.g.
"java.completion.orderByPriorityCompileCheck": "true"surround check could handle ordering
Environment
- Operating System: N/A
- JDK version: N/A
- Visual Studio Code version: 1.82.2
- Java extension version: 1.22.1
- Java Debugger extension version: N/A
Steps To Reproduce
Here's a simple setter-to-fluent workflow change, but I seem to hit this case of not looking at preexisting text to the right
Current Result
see image 3
Expected Result
- don't not overwrite the same text as is being replaced (no idea about ALL cases, but something could be done, but maybe language specific)
- property options on "surrounding smartness"
Additional Informations
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia riproducendo il flusso di lavoro setter-to-fluent con le versioni indicate di VS Code e vscode-java, confrontando Tab ed Enter e le impostazioni dei suggerimenti specificate. Non sono indicati file sorgente né test, quindi individua prima il comportamento di accettazione dei completamenti dell’editor e la relativa integrazione con l’estensione Java. Il lavoro è completato quando il testo circostante duplicato non viene inserito e la configurazione prevista o il comportamento specifico del linguaggio è verificato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java, typescript, vscode
- Ambito
- developer-experience, tooling
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100