Open dandavison opened 4 years ago
Eglot displays the following:
Connected! Server `ccls' now managing `c++-mode' buffers in project `test-ccls'.
Because ccls sends serverInfo
of the LSP v3.15.0. If rust-analyzer adds support for serverInfo, Eglot will automatically something similar for rust as well.
@nemethf Thanks! I did see (plist-get serverInfo :name)
in the code but wasn't sure how often we should expect it.
OK, so from a quick search it looks like serverInfo
was added in protocol version 3.15, released in January.
I'm using eglot for python and rust, and it appears that pyls
also doesn't support serverInfo
currently. I see no code or issue hits when searching their repo for that term, and eglot is also not displaying the contact type:
Connected! Server `EGLOT (compilers/python-mode)' now managing `python-mode' buffers in project `compilers'.
So I think there are at least two questions:
Is the length of time it's going to take server implementations to support serverInfo
sufficiently long that it would make sense for eglot to fall back to showing the information itself for now?
When the user is using, for example, (host, port)
I can see value in displaying that info in the connection message (so the general concept would be "format the elisp contact
object as a human-readable string"). So should eglot do that?
It seems rust-analyzer now sends the serverInfo.
If you are interested in receiving the serverInfo from pyls, you should at least open an issue at its project page. But I found that project was not very responsive. But it's worth a try.
- Is the length of time it's going to take server implementations to support
serverInfo
sufficiently long that it would make sense for eglot to fall back to showing the information itself for now?
I tend to think that it is not worth working on this: we show the serverInfo if it is available, and if not, the server should be fixed. For debugging needs, that should be fixed by #476. However, if someone wants this and sends a PR, I don't see any reason why we can't accept it, if it is done cleanly.
- When the user is using, for example,
(host, port)
I can see value in displaying that info in the connection message (so the general concept would be "format the elispcontact
object as a human-readable string"). So should eglot do that?
I can see value in displaying this information, I think. Should it be displayed both in a message and in the events buffer, perhaps?
When connecting, I would like eglot to display a message like this:
Currently, the message does not display the
rust-analyzer
part.In fact, personally, I would be happy with
but I'm not that experienced with the project and I may not be appreciating the utility in that extra component.
If you are sympathetic to this suggestion, I can work on it. The implementation could perhaps involve a new function named something like
eglot-format-contact
oreglot-contact-readable-name
. That could perhaps be used here:as long as you are happy including the new info in the process name. Alternatively it could simply be used here: