folke / noice.nvim

💥 Highly experimental plugin that completely replaces the UI for messages, cmdline and the popupmenu.
Apache License 2.0
4.37k stars 101 forks source link

bug: cmdline popupmenu completions (cmp backend) stop working after the first time #958

Open druskus20 opened 3 weeks ago

druskus20 commented 3 weeks ago

Did you check docs and existing issues?

Neovim version (nvim -v)

NVIM v0.10.1

Operating system/version

Linux, Ubuntu

Describe the bug

Using the "cmp" backend for the popupmenu only works the first time, in subsequent attempts it simply does not show up.

https://github.com/user-attachments/assets/7f6828e9-0033-4585-9a83-240c3e5de21b

  {
    "folke/noice.nvim",
    opts = {
      cmdline = {
        view = "cmdline",
        enabled = true,
      },
      messages = {
        enabled = true,
      },

      popupmenu = {
        enabled = true,
        backend = "cmp"
      }
    },

I am also using LazyVim (somewhat heavily modified), but I was able to reproduce - see bellow

Steps To Reproduce

  1. Type a command and press TAB
  2. It should work
  3. Press ESC to exit (or choose a command)
  4. Repeat, type a command, this time TAB does nothing.

Expected Behavior

The completion menu opens again, just like it does with the nui backend

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 = {
    { "hrsh7th/nvim-cmp", opts = {} },
    { "folke/noice.nvim", opts = {

      cmdline = {
        view = "cmdline",
        enabled = true,
      },
      messages = {
        enabled = true,
      },

      popupmenu = {
        enabled = true,

        backend = "cmp" 

      }
    } 
  },
  },
})
joshuarubin commented 14 hours ago

+1