Closed apiraino closed 3 years ago
@apiraino In terminals, lsp-ui
can't use child frames, which is used in GUI.
In terminals the implementation is based on overlay.
the sideline is broken
I think you're referring to lsp-ui-doc
from you gif, but the gif is too fast I can't really see what/where is it broken.
In my terminal it renders like this:
Do you have a different result with your config ? What configuration would make your experience better ? Setting a maximum width and height ?
ah thanks a lot @sebastiencs for the hints and corrections! Now I'm starting to understand how it is supposed to work.
So, here is a more meaningful description of what happens. The doc overlay is too wide and each line of the documentation is cut in two lines (notice the \
char at the end of each line).
I also suspect the documentation rendering is broken: what do I need to install to properly render the docs without using webkit?
The funny thing is that no matter my shell width, the overlay shows this behaviour. If I enlarge the shell, the overlay alignment gets fixed, but if I move back and forth triggering the doc overlay, it always appears broken until I resize the shell window. See this behaviour in this GIF (~5mb):
I've tried fiddling with some settings (quasi-randomly changing stuff), trying to force a different behaviour but I didn't see anything different
'(lsp-ui-doc-alignment (quote window))
'(lsp-ui-doc-border "red")
'(lsp-ui-doc-header t)
'(lsp-ui-doc-max-height 10)
'(lsp-ui-doc-max-width 50)
'(lsp-ui-doc-position (quote top))
'(lsp-ui-doc-use-childframe nil)
@apiraino You most likely have a configured variable that lsp-ui
doesn't take into account. Can you try to disable your customization/packages and found what cause that issue
@sebastiencs I've finally had time to dig this issue to the bottom and understand the reason behind.
This line in my custom.el
breaks the UI
'(display-line-numbers t)
if I comment this line everything goes in place and the documentation UI looks fine.
Armed with this new knowledge now I see there is a number of issues correlated.
Currently I have Emacs 27.1 and lsp-ui 20201209.332 from melpa but the issue still persists. I have also tried the suggestion in #380 and add the hook in my lsp-ui initialization (which I don't understand what it does), but it didnt work (or I wrote it wrong):
(use-package lsp-ui
:init
...
(add-hook 'lsp-ui-doc-frame-mode-hook #'(lambda()(display-line-numbers-mode -1)))
:commands lsp-ui-mode)
Still a problem on my end to investigate or could still be an issue with the display line number? I run emacs -nw
so my config could be slightly more problematic...
thanks
closing because I failed to isolate/fix the issue and now cant repro anymore
Hi,
I use emacs 26.3 without graphical environment, have the Ubuntu
emacs-nox
package which basically corresponds to runningemacs -nw
. I've realized thatlsp-ui
is not looking great without GUI, the sideline is broken (while lsp-ui works perfectly on stardard graphical emacs). See here:I'm running lsp-ui without any customization or
setq
parameter, just installed and activated it.Is there any configuration I can try to fix this? Perhaps somewhere there is
thanks