Closed reidrac closed 5 years ago
The client's responsibility is to present whatever completions the server offers it. If you don't like the completions, you surely need to take this to the server.
OK, thanks!
So I guess this is a problem with metals (the server); although when other editors use metals, this doesn't happen.
It's not that clear cut, at least from a user's perspective. The response to a CompletionRequest is pretty complex and contains much more than just the text to be inserted. It would be entirely feasible for a client to mishandle it and insert the wrong text. Note e.g. the distinction between "label" and "insertText".
That said, I have no idea what's going on here, just wanted to point out that it's not "surely" the server's fault.
From my point of view this makes LC-neovim unusable with metals; whether LC-neovim or metals is to blame is irrelevant because I can use them together. I may be doing somwthing wrong, but I can't see how this can be used by anyone.
val logger = org.log4s.getLogger
// automcomplete from logger. to logger.debug
logger.debug(t: Throwable)(msg: String): Unit
This is not what I would expect, and it is definitely not useful.
If the maitainers change their mind, this isssue is easy to reproduce. They can reopen this issue or make a new one.
Well, if you're interested in solving this, you should see if lcn offers logging, and then check out the CompletionList
response metals sends.
g:LanguageClient_completionPreferTextEdit
might be relevant, you could try setting that.
I'm running latest release with nvim.
When I use omni completion, the suggestions include the return type. Not sure if this is desirable or not, but I guess making it configurable would be great. I've seen Metals LSP used in other editors and when autocompletion is used, the result won't include the return type.
For example:
I don't know if this is a bug. The code compiles, but I don't want to specify the return type of every method (specially if this only happens when I use the omni completion).
I've checked the documentation but I failed to find how this behaviour can be changed.
Thanks a lot for this project!