Hi folks! Quick question, in case this was reported already. I noticed that rust-analyzer does not honour the client's markup kind setting. For example, I have my vim client set to send
plaintext as the
rust-analyzer sends content with
Is this a known issue or should I open an issue about it?
You are correct we do not currently look at markdown capabilities. https://github.com/rust-analyzer/rust-analyzer/issues/4326 is the issue
Feel free to comment on the issue. PRs are qelcome and we can help you with that!
Ah cool! Thanks for the link! :bow:
@Martin Asquino can you comment on the issue? I'd like to know how this manifests other than the
kind being different. Does your editor not show anything?
@Jeremy Kolb Oh, no, it's just that I prefer the documentation to be plain text, but it does show correctly (formatting aside).
This is how hover looks in my editor (vim) for Rust code:
And this is how I would prefer it to be shown (this last screenshot is from Go, with gopls):
It is definitely not a critical issue.
We are definitely non-compliant here so it should be fixed. Can you switch gopls to use markdown and post a screenshot? I'm curious what the difference is
It's a weird feature in the LSP. I would expect the client to specify which format it wants but instead it reports which formats it supports in preferential order. I'm not sure if your language client just swaps the order or only send down
text as its supported format
Yeah it's definitely weird. The language client I'm using just takes a list of values and sends that to the server, my current config is only
['plaintext'] though, not sure what the correct behaviour would be for that case, but I'd much rather have it display what it can (I reckon that's what rust-analyzer is doing now) than error if I don't include one of the options or if one of the options is not supported by that specific server.
Here's how gopls display that same bit of code without setting the preferred markup kind for hover or setting
(the white block there is just really lazy censoring :smiley: )