scalameta / metals

Scala language server with rich IDE features 🚀
https://scalameta.org/metals/
Apache License 2.0
2.1k stars 336 forks source link

Auto-completion starts suggesting keywords while entering block-comment #5731

Closed oscar-broman closed 1 year ago

oscar-broman commented 1 year ago

Describe the bug

  1. Go to Metals website
  2. Click "Try Online with Gitpod"
  3. Wait for everything to be set up
  4. Open src/main/scala/Main.scala
  5. Start typing /*, wait ~0.1sec, then press enter

The auto-completion will insert def into the block-comment, which is not what's desired.

Note: If I have a line such as // */ below, and I start typing /* then this does not happen. I'm guessing this is due to fact that no parser errors will occur.

image

Expected behavior

The expected behavior is that a new line is added.

Operating system

macOS

Editor/Extension

VS Code

Version of Metals

v1.0.1

Extra context or search terms

completion suggestion auto-complete auto-suggest comment

tgodzik commented 1 year ago

Thanks for reporting! It looks like a bug indeed. Most likely the only thing to complete should be */ in that case.