bug: Disabling cmdline formatting while view is set to "cmdline" causes tab completion to show on wrong side
shreyas-a-s opened this issue · comments
Shreyas A S commented
Did you check docs and existing issues?
- I have read all the noice.nvim docs
- I have searched the existing issues of noice.nvim
- I have searched the existing issues of plugins related to this issue
Neovim version (nvim -v)
0.9.4
Operating system/version
Debian 12 bookworm
Describe the bug
I am trying to use noice.nvim as the notification handler and hence disabling any cmdline things which it provides.
I like the normal cmdline look so I set view = "cmdline"
. I also don't want any formatting like the > symbol hence disabled formatting using cmdline = false
as you can see in the picture.
But when I try to tab-complete a command, the completions shows up on right side (wrong side).
Steps To Reproduce
- Add the following config to noice setup function in minimal.lua provided in wiki:
{
cmdline = {
view = "cmdline",
format = {
cmdline = false,
},
},
},
- Launch nvim with
nvim -u minimal.lua
- Type
:T
- Press Tab for tab-completion
Expected Behavior
Tab-completion menu showing up in left side.
Repro
-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")
-- 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)
-- install plugins
local plugins = {
"folke/tokyonight.nvim",
"folke/noice.nvim",
-- add any other plugins here
"MunifTanjim/nui.nvim",
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
vim.cmd.colorscheme("tokyonight")
require("noice").setup({
cmdline = {
view = "cmdline",
format = {
cmdline = false,
},
},
})
Shreyas A S commented
Wow, such a quick fix. I can confirm it fixes the issue. Great job, @Sam-programs.