Issafalcon / lsp-overloads.nvim

Extends the native nvim-lsp handlers to allow easier navigation through method overloads.
MIT License
97 stars 4 forks source link

Bug when setting `floating_window_above_cur_line = true` #22

Closed goingtosleep closed 1 year ago

goingtosleep commented 1 year ago

I encountered this strange gap when setting the floating position:

As I've seen, when the current line is under half-screen, the floating window will be positioned above, so no need to add offset_y as in this code.

I tried patching line 165 with:

-- if lines_above > height then
if lines_above > height and lines_above < math.floor(vim.fn.winheight(0) / 2) then
  config.offset_y = -height - 3
end

and it seems ok. I'm using nvim v0.8.3.

Thank you 😊

Issafalcon commented 1 year ago

Good catch @goingtosleep ! I'll add this into my next update.

Issafalcon commented 1 year ago

Closing this as it has been fixed in the latest updates