LSP Completion pop-up obstructs view of rest of buffer

Greetings, just recently started testing out Kakoune as my main editor and I am loving everything so far. The LSP plugin is exceptional with how easy it was to set up (coming from neovim). My biggest and really only issue so far is that sometimes the pop-up of the info buffer? will completely over take my view of my cursor and the buffer itself.

The main test to recreate this is in a python file and import requests or triggering autocompletion. And depending on the size of the documentation it will encompass my whole view until i type something else. I imagine this is related to adjusting this parameter “lsp_hover_max_lines” was note sure.

Any assistance would be beyond helpful!

Yes, lsp_hover_max_lines is probably the easiest way to limit how much documentation the LSP plugin tries to show.

You should be able to put something like:

set global lsp_hover_max_lines 5

…into your kakrc file, somewhere after the code that invokes kak-lsp --kakoune.

Excellent! thank you!

Is there a way to change where this pop up shows? Maybe upper right of the buffer/window or something similar?

If I look at the kak-lsp README and search for “hover”, one of the first hits you’ll find is the lsp-hover command, which mentions:

to show hover anchored to hovered position, use set global lsp_hover_anchor true

From your screenshot it looks like this is already the case in your configuration. Kakoune only has two ways to show information: either next to the cursor (above or below, wherever there’s more room) or at the bottom-right. With giant info boxes like the one in your screenshot there’s no good way to make that much information convenient, but you can try switching the lsp_hover_anchor option to false and see if that helps.

Maybe try getting the auto hover in for to show in a different client? I’m thinking the “toolsclient” as described here?

I’m gonna give that a shot because I too want to have the information showing all the time, but not over my code.

So I tried this, definitely looks interesting but I just got errors. Were you able to get this set up?

So oddly, this works for the hover data, but not the info after an auto-complete message so the problem still remains. But the hover info, versus what appears after the auto-complete is different.

To close this, I ended up building the kak-lsp from source and the issue went away. So if anyone is encountering this I would just follow the repo documentation lol
“Contents below corresponds to the master branch HEAD and could be slightly out-of-sync with the version installed from pre-built binaries.”