noice.nvim
noice.nvim copied to clipboard
bug: noselect is ignored resulting in a bug with coq
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)
NVIM v0.9.5
Operating system/version
Windows 11 with WSL 2 Ubuntu
Describe the bug
First element of the menu is preselected when I enable popumenu with nui backend even though I set completeopt=menu,preview,noinsert,menuone,noselect
.
It's problematic because I use coq and I don't enable the preselect option. So when I see noice.nvim popupmenu I think the first element is selected so I press
Despite the fact the first element is highlighted you have to press tab (first element is still highlighted) and then
I wish I could just disable popumenu but then in cmdline
I don't have any popup (not even the native one ?) to see suggestions. It is instead at the bottom of the screen barely readable.
Steps To Reproduce
nvim -u init.lua a
Run command :COQDeps
Restart neovim
nvim -u init.lua a
type something in the buffer like TEST and then try starting type TES again then the TEST
will appear. It will be highlighted. Press enter. Instead of the highlighted option it will insert a newline (very confusing).
Expected Behavior
Same behaviour as without noice (or noice when we disable popupmenu) : not highlighting the first element
Repro
-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")
vim.g.coq_settings = {
auto_start = "shut-up",
}
-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath })
end
vim.opt.runtimepath:prepend(lazypath)
vim.cmd("set completeopt=menu,menuone,noselect")
-- install plugins
local plugins = {
"folke/tokyonight.nvim",
"folke/noice.nvim",
-- add any other plugins here
{
"folke/noice.nvim",
event = "VeryLazy",
keys = {
{ "<leader><BS>", "<cmd>Noice dismiss<cr>" },
},
opts = {
lsp = {
progress = {
-- enabled = false,
},
hover = {
enabled = false,
},
signature = {
enabled = false,
},
},
messages = {
view = "mini",
view_error = "notify",
enabled = true,
},
},
dependencies = {
"MunifTanjim/nui.nvim",
"rcarriga/nvim-notify",
},
},
{
"ms-jpq/coq_nvim",
dependencies = {
{ "ms-jpq/coq.artifacts", branch = "artifacts" },
{ "ms-jpq/coq.thirdparty", branch = "3p" },
},
event = { "BufReadPre", "BufNewFile" },
},
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
vim.cmd.colorscheme("tokyonight")
-- add anything else here