bug: Weird Scrollbar Appears on UI
Did you check docs and existing issues?
- [X] I have read all the noice.nvim docs
- [X] I have updated the plugin to the latest version before submitting this issue
- [X] I have searched the existing issues of noice.nvim
- [X] I have searched the existing issues of plugins related to this issue
Neovim version (nvim -v)
v0.10.1
Operating system/version
MacOS 14.6.1
Describe the bug
This weird scrollbar keeps randomly appearing on the UI. Once it shows up, it doesn't go away. When I quit NeoVim and reopen, it goes away but it appears again shortly.
This seems like it has something to do with the dialog box of the API doc (Shift + K shows these dialog boxes).
I'm using LazyVim by the way.
Steps To Reproduce
- Open a TypeScript file with Neovim.
- Start writing some code.
- View the API doc of a certain API by placing the cursor over it and press Shift + K.
Expected Behavior
The weird scrollbar shouldn't appear on the UI.
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 = {} },
-- add any other plugins here
},
})
Can confirm! Same neovim version and OS as the OP. I haven't been able to figure out what triggers it to appear...
I experience the same bug.
Neovim version: 0.10.1 Operating system: Debian 12
Same issue.
Same issue.
Same issue.
Same issue.
I can't reproduce this and never saw this before. Please provide a step by step repro so I can look into this.
I can't reproduce this and never saw this before. Please provide a step by step repro so I can look into this.
@folke Managed to get a reproduction. I think it happens in insert mode, if the API doc overflows the pane and is then dismissed by typing. Bit hard to explain with text but I got it on video:
https://github.com/user-attachments/assets/fcc78bf8-1424-42b6-ba37-ecd15e5f8f4f
Three things to see in the video:
- When the screen is too small vertically, the scrollbar stays (Happens at around 7 seconds)
- When it has enough space, no scrollbar disappears correctly (Around 30 seconds)
- When it doesn't have enough horizontal space, due to the split it happens again (34 seconds)
Please let me know if this doesn't make sense. The repo I used is here: https://github.com/MikeBellika/noice-scroll-repro
PS. Thank you for LazyVim, it's the best editor I've used so far!
as a temporary fix, I had the same issue and i used this:
views = { hover = { scrollbar = false, }, }
i don't think it fixes it completely but at least it happens only rarely now.
hopefully it'll give some insight on where the issue is coming from.
full noice config:
{
"folke/noice.nvim",
opts = function(_, opts)
opts.debug = false
opts.presets = {
lsp_doc_border = true,
}
opts.views = {
hover = {
scrollbar = false,
},
}
opts.routes = opts.routes or {}
table.insert(opts.routes, {
filter = {
event = "notify",
find = "No information available",
},
opts = { skip = true },
})
local focused = true
vim.api.nvim_create_autocmd("FocusGained", {
callback = function()
focused = true
end,
})
vim.api.nvim_create_autocmd("FocusLost", {
callback = function()
focused = false
end,
})
table.insert(opts.routes, 1, {
filter = {
["not"] = {
event = "lsp",
kind = "progress",
},
cond = function()
return not focused
end,
},
view = "notify_send",
opts = { stop = false },
})
vim.api.nvim_create_autocmd("FileType", {
pattern = "markdown",
callback = function(event)
vim.schedule(function()
require("noice.text.markdown").keys(event.buf)
end)
end,
})
return opts
end,
},
Was able to reproduce it with Noice history.
It only happened when not using q, but closing with :close or :bd.
Should be fixed now!