Closed lbialy closed 10 months ago
Thanks for reporting! This was introduced in LSP 3.16.x and we currently only use TextEdit for completions, but we could also use InsertReplaceEdit, which specifies insert and replace ranges
Actually, I realised it's a duplicate https://github.com/scalameta/metals-feature-requests/issues/205
Is your feature request related to a problem? Please describe.
Metals ignores the value of
editor.suggest.insertMode
setting in VSCode currently. This means that whenever you go to a start of some expression, insert one letter and wait for autocomplete suggestions, then select one and press either enter or tab the whole first word gets replaced. This is one of two possible behaviours foreditor.suggest.insertMode
setting (which areinsert
orreplace
).Describe the solution you'd like
I'd like to use
insert
mode in which suggestion from autocomplete would be inserted BEFORE first word of existing code (caret should end up being exactly at the end of code inserted from suggestion and right before the first word of existing code).Describe alternatives you've considered
The only available workaround is to press space, then left arrow to have a space separator between my caret and first identifier.
Additional context
Tragedy in pictures
Search terms
vscode editor.suggest.insertMode insertMode