folke / noice.nvim

💥 Highly experimental plugin that completely replaces the UI for messages, cmdline and the popupmenu.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

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).

Screenshot from 2024-02-22 01-25-18

Steps To Reproduce

  1. Add the following config to noice setup function in minimal.lua provided in wiki:
{
    cmdline = {
        view = "cmdline",
        format = {
            cmdline = false,
        },
    },
},
  1. Launch nvim with nvim -u minimal.lua
  2. Type :T
  3. Press Tab for tab-completion

Expected Behavior

Tab-completion menu showing up in left side.

image

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,
    },
  },
})

Wow, such a quick fix. I can confirm it fixes the issue. Great job, @Sam-programs.