noice.nvim
noice.nvim copied to clipboard
bug: window offsets applies to the bottom of the window when the window appears above the cursor
Did you check docs and existing issues?
- [X] I have read all the noice.nvim docs
- [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.0-dev-bb38c06
Operating system/version
Arch Linux
Describe the bug
Noice adds offsets when enabling border for LSP docs so that the window will not cover the current line:
But if the floating window is above the cursor, the offsets apply to the bottom of the window, and there will be a gap between the window and the cursor
Steps To Reproduce
- Enable LSP (by nvim-lspconfig)
- call
vim.lsp.buf.hover()
Expected Behavior
The original vim.lsp.util.open_floating_preview
do not have this problem.
Repro
vim.o.number = true
local root = vim.fn.fnamemodify("./.repro", ":p")
for _, name in ipairs { "config", "data", "state", "cache" } do
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
local lazypath = vim.fs.joinpath(root, "lazy.nvim")
if not vim.uv.fs_stat(lazypath) then
vim.fn.system {
"git",
"clone",
"--filter=blob:none",
"--single-branch",
"https://github.com/folke/lazy.nvim.git",
lazypath,
}
end
vim.opt.runtimepath:prepend(lazypath)
require("lazy").setup {
"folke/tokyonight.nvim",
{
"folke/noice.nvim",
dependencies = {
"MunifTanjim/nui.nvim",
"rcarriga/nvim-notify",
},
opts = {
presets = {
lsp_doc_border = true,
},
},
},
{
"neovim/nvim-lspconfig",
config = function()
require("lspconfig").lua_ls.setup {}
end,
},
}
vim.cmd.colorscheme "tokyonight"
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue still exits.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue still exits.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue still exits.