atom-ide-scala
atom-ide-scala copied to clipboard
Completions don't (always) delete their prefix
ide-scala version: 0.9.0 metals version: 0.5.2 scala versions: 2.11.12, 2.12.8 operating systems: OSX, Windows
Steps to reproduce
- open a metals project
- create file
src/main/scala/Foo.scala
- type
class Foo {
java.time.Loc
}
- a popup has automatically appeared by now suggesting
LocalDate
,LocalTime
,LocalDateTime
,Clock
. - select
LocalDateTime
with arrows keys and accept - text changes to
class Foo {
java.time.LocLocalDateTime
}
If you now undo
and retry the completion the Loc
prefix gets deleted. If you select the completion with the cursor the Loc
prefix gets deleted. If in the above scenario you select Clock
the Loc
prefix gets deleted.
Same thing happens when you accept the first suggested completion with tab
or enter
, which is probably the most common situation.
I've seen this on the previous version as well. I wonder if it is something with the plugin or Atom itself
I guess it's some interplay between atom and the plugin. It doesn't seem to happen with completions—based on words previously used—that Atom itself suggests.
Yes, it's a known problem. I think that this is a bug in atom-languageclient and I'm hoping that this PR will fix it: https://github.com/atom/atom-languageclient/pull/254