lsp-ui
lsp-ui copied to clipboard
Weird Sideline Hover Symbol Line Wrap
As the following image (red underline) shows, some sideline hover symbols' info has been wrapped to the new line. It seems that the weird behavior is not related with the length of the info, since in some cases even some short info got wrapped.
Hi, I tried to set the height to 0.7 but there is no affect ... I did it because the font-size seems higher then the normal font.
I'm also having this issue, using the standalone config from rksm/emacs-rust-config which configures lsp-ui with the sideline
Isn't this issue like #184?
I had this problem and it was caused by the sideline text using markdown-code-face
which inherits from fixed-pitch
, which uses the generic Monospace
placeholder font family. Looking closer at the two screenshots, it looks like most of the sideline text besides the variable names in boxes are a different font from everything else, so this is probably what's causing it for you here too. If you just set the font family for fixed-pitch
to the same as your default font, this issue should go away.
As for how to fix this in general, I'm not sure. lsp-ui-sideline--format-info
fontifies the sideline text with lsp--render-element
, and that is supposed to render the string with the correct major-mode or as markdown otherwise. Looking at the text that get sent there, its kind
is set as markdown
and the actual content of the text is a markdown codeblock annotated with the correct language.
I've seen this happen in both rust in python (the only languages I use lsp-mode with) so I don't know if the strings are formatted differently in other language modes.