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: Cursor Stays in Block Mode in Command Line Mode with noice.nvim

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

NVIM v0.9.4

Operating system/version

macOS 14.3.1 (23D60)

Describe the bug

After entering command-line mode with : in Neovim using noice.nvim, the cursor remains in block mode instead of switching to line mode. Normally, Neovim's cursor changes shape based on the mode (block in normal mode, line in insert mode). However, with noice.nvim enabled, this behavior is disrupted, specifically when transitioning from command-line mode back to normal or insert mode; the cursor does not revert to its expected shape.

Steps To Reproduce

  1. Open Neovim with noice.nvim enabled.
    
  2. Enter insert mode; observe the cursor changes to line mode.
    
  3. Return to normal mode; observe the cursor changes back to block mode.
    
  4. Hit : to enter command-line mode; the cursor stays in block mode as expected.
    
  5. Exit command-line mode by hitting Enter or Esc.
    
  6. Notice the cursor remains in block mode instead of switching back according to the current mode.
    

Expected Behavior

The cursor should switch between block and line modes according to the current Neovim mode, even when noice.nvim is enabled. Exiting command-line mode should revert the cursor to its correct shape based on the mode it returns to (block for normal, line for insert).

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
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

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

Not able to replicate the issue. Could you share a video of the issue along with the code of how you've configured noice.nvim?

I am unable to replicate this issue currently. The issue may have been between the keyboard and the chair.