You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: disable line wrapping in LSP hover docs in some cases
## Details
Issue: #408
For narrow windows adding the language icon above code blocks can lead
to text wrapping which will lead to an extra line under the code block.
There are really only 2 ways to fix this:
1. Increase the window width such that it is wide enough to avoid wrapping.
2. Disable line wrapping.
In the first case we end up needing to accurately calculate the width we
need to avoid the line wrapping and also check that the new width does
not cause the window to flow out of bounds. There's lots of edge cases
to these and the end result doesn't look particularly great since it'll
add extra space off the side of these narrow doc buffers.
So instead we take the much simpler approach of disabling line wrapping
on these buffers, however we do this only when the content in the buffer
does not need line wrapping, i.e. the width of the longest line is <=
the width of the window. This should work for most situations but I'm
sure there will be some edge cases to it.
0 commit comments