Closed kting28 closed 1 year ago
As a rust user, I, too, have this issue.
My suggested fix is that multiple lines show in each item, as that would be the most ergonomically correct interpretation.
It seems like this is by design: https://github.com/folke/trouble.nvim/blob/20d1b30d6925213abece21d35858a16e11d1e9fc/lua/trouble/util.lua#L180
Okay I tried something in #305. Gotta wait to hear back from @folke regarding if this should be behind a setting, since this changes the layout a bit. My proposal is to display the diagnostic source and code in its own line, and have each related diagnostic below it.
A preview of how this looks:
Note that this also affects single line diagnostics (I'm open to not changing these though):
What do you think? :)
May be leave single line alone ?
@kting28 yeah I think it would be better to keep the compact format for single-line diagnostics. I'm also debating whether have the diagnostic icon for each line of multiline diagnostics (as in the picture above shows) or just have it before the diagnostic source and position...
Okay this is what it looks like with the latest commit:
As for folding, it might be beyond my expertise, but I'll do my best :)
I also want to wait for @folke's blessing before I continue to make sure these are changes that he approves.
After looking at it more closely, I think that keeping the icon besides the diagnostic code looks better:
Did you check docs and existing issues?
Neovim version (nvim -v)
0.9.0
Operating system/version
Ubuntu 22.0
Describe the bug
The actual diagnostic messages from rust analyzer contains 2 lines:
Steps To Reproduce
Expected Behavior
At least a space should be introduced when the two lines are joined together.
Repro