Skip to content
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.

Completions don't (always) delete their prefix #79

Open
Jasper-M opened this issue Jun 3, 2019 · 4 comments
Open

Completions don't (always) delete their prefix #79

Jasper-M opened this issue Jun 3, 2019 · 4 comments

Comments

@Jasper-M
Copy link

Jasper-M commented Jun 3, 2019

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

  1. open a metals project
  2. create file src/main/scala/Foo.scala
  3. type
class Foo {
  java.time.Loc
}
  1. a popup has automatically appeared by now suggesting LocalDate, LocalTime, LocalDateTime, Clock.
  2. select LocalDateTime with arrows keys and accept
  3. 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.

@Jasper-M
Copy link
Author

Jasper-M commented Jun 3, 2019

Same thing happens when you accept the first suggested completion with tab or enter, which is probably the most common situation.

@cquiroz
Copy link
Contributor

cquiroz commented Jun 3, 2019

I've seen this on the previous version as well. I wonder if it is something with the plugin or Atom itself

@Jasper-M
Copy link
Author

Jasper-M commented Jun 3, 2019

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.

@laughedelic
Copy link
Owner

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: atom/atom-languageclient#254

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants