scalameta / metals

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

No completion for scala 2 string interpolators #6750

Open susliko opened 2 months ago

susliko commented 2 months ago

Describe the bug

//> using scala 3.3.3

implicit class LogHelper(val sc: StringContext) extends AnyVal {
  def info(args: Any*): String = ???
}

extension (sc: StringContext)
  def warn(args: Any*): String = ???

@main def logHelpers(): Unit = 
  info"" // No completion while typing "info"
  warn"" // Completion works

Expected behavior

Code completion suggests "info" String interpolator.

Operating system

Linux

Editor/Extension

Nvim (nvim-metals)

Version of Metals

v1.3.5

Extra context or search terms

No response

tgodzik commented 2 months ago

Thanks for reporting! This looks like an issue in the presentation compiler, we should take a look there.