reddit / emacs

LSP UI peek customization

_gjm_ · 2022-11-02 12:56
Hello. I have configured a bigger line spacing because I like to have spacing between lines to increase readability. ``` (setq-local default-text-properties '(line-spacing 0.50 line-height 1.50)) ``` I use LSP peek to show references and definitions but, since I'm not using the default line height, the peek panel bottom most of the time is not visible because (I guess) wrongly calculates the panel's height. Is there a way to customize de panel position and/or size so I can adjust it to my config? Thanks in advance. **UPDATE** I found a fix here: https://github.com/emacs-lsp/lsp-ui/issues/441#issue-611772813 It uses a child frame (`posframe` package) to display the peek ui.
big_lentil · 2022-11-02 17:39
Maybe setting lsp-ui-peek-peek-height to a value higher than the default 20 could help
_gjm_ · 2022-11-03 09:37
Already tried it... no effect... As I see it emacs calculates the peek height and places the cursor at an offset from bottom. I think the calculation is based on the face properties. It doesn't account for the line height and spacing changes. Maybe if there was an way to customize the cursor position when opening the peek panel. Force it to be at the start of the buffer for example.