Closed gvolpe closed 5 years ago
Update: it was a bug in coc.nvim
's parser, fixed in 0a0ab7c.
Here are all the reported labels that work:
flatMap[B](f: Int => Option[B]): Option[B]
fromFuture[A](iof: IO[Future[A]]): IO[A]
raiseError[A](e: Throwable): IO[A]
And here the ones that don't:
reduce[A1 >: Int](op: (A1, A1) => A1): A1
fromEither[A](e: Either[Throwable,A]): IO[A]
race[A, B](lh: IO[A], rh: IO[B])(implicit cs: ContextShift[IO])
It doesn't work because coc.nvim
parses the values by comma (,
), present in these labels.
Result from CocInfo
Describe the bug
Results from
signatureHelp
are not being displayed bycoc.nvim
on very specific cases. The response from the LSP Server seems correct and it works in VS Code for example. See here.To Reproduce
I debugged the LSP server as suggested here and pasted the results of
:CocCommand workspace.showOutput
into the inspector.Here are the logs: https://files.gitter.im/neoclide/coc.nvim/URKQ/coc-metals-trace-2.log
I don't think a minimal
vim
config is needed since it seems to happen always regardless of the configuration but just in case my config can be found here.Below are the signatures shown in the logs that are displayed as expected:
Option(1).flatMap
shows signatureflatMap[B](f: Int => Option[B]): Option[B]
.IO.fromFuture
shows signaturefromFuture[A](iof: IO[Future[A]]): IO[A]
.IO.raiseError
shows signatureraiseError[A](e: Throwable): IO[A]
.And here are the signatures that are not being displayed despite given a correct server response:
List(1).reduce
does not showreduce[A1 >: Int](op: (A1, A1) => A1): A1
.IO.fromEither
does not showfromEither[A](e: Either[Throwable,A]): IO[A]
.IO.race
does not showrace[A, B](lh: IO[A], rh: IO[B])(implicit cs: ContextShift[IO]): IO[Either[A,B]]
The cases in which the client doesn't display the signature help are always the same. I could try
List(1).reduce
100 times and I will never get it to work. Same for the cases that do work: the signature is always displayed.Coc debug logs
Here's more information of what's being logged by
coc
in debug mode:In the first two cases the signature help is displayed but not in the last case.
Screenshots
Working as expected:
Not working:
Thanks for looking into it and please let me know if I can help in any way.