Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: nui autocomplete menu for cmdline does not persist and update like cmp backend #797

Open
3 tasks done
theKnightsOfRohan opened this issue May 13, 2024 · 1 comment
Open
3 tasks done
Labels
bug Something isn't working stale

Comments

@theKnightsOfRohan
Copy link

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.5 release

Operating system/version

macOS Sonoma 14.4.1

Describe the bug

When using the nui backend for the preset cmdline popup, you can press on the cmdline menu to show the list of all the commands you can run, and navigate it with and , like normal. However, ass soon as you type a letter, the popup disappears. Note that the cmp backend functions as intended, it's only the nui backend which does not work.

Steps To Reproduce

  1. Open cmdline using :
  2. Press <C-d> to open popup menu
  3. Use <Tab> and <S-Tab> and see that they work as intended
  4. Type any letter and see that the popupmenu disappears.

Expected Behavior

I would expect the nui backend cmdline popup to work the same way as cmp, where typing after the popupmenu has been opened will not make it disappear, but rather update its contents.

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
    -- both backend plugins added for comparison purposes
    "MunifTanjim/nui.nvim",
    "hrsh7th/nvim-cmp",
}

require("lazy").setup(plugins, {
    root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")
-- add anything else here

require("noice").setup({
    popupmenu = {
        backend = "nui",
    },
    presets = {
        command_palette = true,
    },
})
@theKnightsOfRohan theKnightsOfRohan added the bug Something isn't working label May 13, 2024
Copy link
Contributor

github-actions bot commented Jul 6, 2024

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.

@github-actions github-actions bot added the stale label Jul 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

1 participant