Did you check docs and existing issues?
Neovim version (nvim -v)
NVIM v0.11.2
Operating system/version
MacOS 15.5
Describe the bug
There are a several different cases where the lsp hover window is incorrectly positioned, including several cases where it can overlap the cursor.
When lsp_doc_border is enabled, there are two issues:
- The border isn't factoring in when anchoring the Nui window so it can end up overlapping the current line. To see this, there must be exactly
height (default in config is 20) lines below the cursor:
- When
S anchoring (i.e. drawing the window above the cursor line), the border isn't factored in so the window is offset too high:
The same issue also applies when 'E' anchoring:

- Even with those cases fixed, the hover window is still positioned incorrectly if there's not enough space to put it below the cursor (i.e. the return from
util/nui.lua:anchor starts with "S") because the hover window isn't resized to make sure it fits in the space above:
Steps To Reproduce
- have
lsp_doc_border = true, in presets
Case 1:
- Find an lsp doc entry that's at least 20 lines long
- make sure there are exactly 20 lines below the cursor
- Bring up the hover window via
K or vim.lsp.buf.hover()
Case 2:
- Position cursor in the lower part of the screen (to force hover window to go above the cursor)
- Bring up the hover window via
K or vim.lsp.buf.hover()
Case 3:
- Find a hover doc entry that's longer than the number of lines below the cursor
- Bring up the hover window via
K or vim.lsp.buf.hover()
Expected Behavior
Case 1: Hover window shouldn't overlap the cursor line (or extend into the status line). Instead, it should be displayed above the cursor line
Case 2: Hover window should be position directly above the cursor line (not two lines above)
Case 3: Hover window should be positioned wherever there are the most number of lines (according to vim.go.lines not winheight) and it should be resized to not overlap the cursor
Repro
vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()
require("lazy.minit").repro({
spec = {
{ "folke/noice.nvim", opts = {
presets = {
bottom_search = true,
command_palette = true,
long_message_to_split = true,
inc_rename = false,
lsp_doc_border = true,
},
} },
-- add any other plugins here
},
})
Did you check docs and existing issues?
Neovim version (nvim -v)
NVIM v0.11.2
Operating system/version
MacOS 15.5
Describe the bug
There are a several different cases where the lsp hover window is incorrectly positioned, including several cases where it can overlap the cursor.
When
lsp_doc_borderis enabled, there are two issues:height(default in config is 20) lines below the cursor:Sanchoring (i.e. drawing the window above the cursor line), the border isn't factored in so the window is offset too high:The same issue also applies when 'E' anchoring:

util/nui.lua:anchorstarts with "S") because the hover window isn't resized to make sure it fits in the space above:Steps To Reproduce
lsp_doc_border = true,in presetsCase 1:
Korvim.lsp.buf.hover()Case 2:
Korvim.lsp.buf.hover()Case 3:
Korvim.lsp.buf.hover()Expected Behavior
Case 1: Hover window shouldn't overlap the cursor line (or extend into the status line). Instead, it should be displayed above the cursor line
Case 2: Hover window should be position directly above the cursor line (not two lines above)
Case 3: Hover window should be positioned wherever there are the most number of lines (according to
vim.go.linesnotwinheight) and it should be resized to not overlap the cursorRepro