lsp-ui icon indicating copy to clipboard operation
lsp-ui copied to clipboard

Too small window for docstring

Open Compro-Prasad opened this issue 5 years ago • 7 comments

Screenshot from 2019-04-14 10-58-58

Compro-Prasad avatar Apr 14 '19 05:04 Compro-Prasad

Is this webkit? Does it happen all the time? Emacs version? Please also include logs from that particular request.

yyoncho avatar Apr 14 '19 06:04 yyoncho

Yes, webkit.

emacs-version: GNU Emacs 27.0.50 (build 14, x86_64-pc-linux-gnu, GTK+ Version 3.24.8) of 2019-04-13

Screenshot from 2019-04-14 12-44-16

What kind of logs? *Messages* buffer and *ccls* have no special messages.

Window manager is i3 but I get same results on GNOME.

Compro-Prasad avatar Apr 14 '19 07:04 Compro-Prasad

Also, if the docstring is too long, the scroll behaviour is glitchy. After I scroll down, the page scrolls down by 2-3 lines then resets to the first line. The workaround I am using is to select and drag beyond the docstring frame to scroll the docstring.

Compro-Prasad avatar Apr 14 '19 07:04 Compro-Prasad

I'm also seeing similar behaviour. I'm on GNU Emacs 26.1 on macOS (doom emacs, if it matters)

I do not see "white" window as shown in the first screenshot, I see a black one. I'm new to lsp-ui (started using it for the first time today) - so I don't know if mine is webkit or not.

@Compro-Prasad How can I check and enable webkit (if it is better)

mandarvaze avatar Apr 15 '19 10:04 mandarvaze

@Compro-Prasad How can I check and enable webkit (if it is better)

@mandarvaze Set lsp-ui-doc-use-webkit to t.

Compro-Prasad avatar Apr 15 '19 11:04 Compro-Prasad

I'm seeing similar behavior on 27.0.50. With lsp-ui-doc-use-webkit nil I can consistently reproduce the issue by moving directly from one hoverable point to another; e.g. in CSS mode, if | is point, moving the point from whitespace to |color creates a doc-hover of the correct size for the element. If I then move point directly from |color to |font-size (or any other hoverable css property), the doc string is updated but it looks like the window size isn't recalculated.

cmccloud avatar Apr 27 '19 11:04 cmccloud

I'm also seing this with i3, no webkit.

Edit: I suspect (window-text-pixel-size ...) is giving to little headroom https://github.com/emacs-lsp/lsp-ui/blob/master/lsp-ui-doc.el#L498. Dunno if this is i3 related, tho

torgeir avatar May 08 '21 07:05 torgeir