folke / noice.nvim

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

bug: inserting an automatic <CR> after easymotion #840

Closed danielreis1 closed 1 month ago

danielreis1 commented 1 month ago

Did you check docs and existing issues?

Neovim version (nvim -v)

0.10.0

Operating system/version

windows 10, using alacrity and wsl

Describe the bug

have the following simple mapping: vim.keymap.set({"n", "o"}, 'tt', "<Plug>(easymotion-sn)") I call it from normal mode the problem is that an automatic (enter) is inserted right after I press enter on the easymotion, it's just on this easymotion, as far as I know, I have other easymotions where this isnt happening: example: vim.keymap.set({"n", "v", "o"}, "j", '0<Plug>(easymotion-j)') vim.keymap.set({"n", "v", "o"}, "k", '0<Plug>(easymotion-k)') doesnt have this problem

the culprit in my noice.vim config is: messages = { enabled = true, -- enables the Noice messages UI view = "virtualtext", view_error = "messages", -- view for errors view_warn = "messages", -- view for warnings view_history = "messages", -- view for :messages view_search = false, }, I have tried changing all view types, and most different combinations: example: view = "notify", view_error = "notify", the problem is still there

the only way to fix this is to set enable = false in that part of the config, it should be simple enough problem to reproduce

Steps To Reproduce

1. set the following in your noice.vim config, on top of the default config messages = { enabled = true, -- enables the Noice messages UI view = "virtualtext", view_error = "messages", -- view for errors view_warn = "messages", -- view for warnings view_history = "messages", -- view for :messages view_search = false, },

  1. install easymotion
  2. set keymap for this easymotion: vim.keymap.set({"n", "o"}, 'tt', "<Plug>(easymotion-sn)")
  3. test

Expected Behavior

an automatic (enter) appears, it's not supposed to appear,

Repro

No response

folke commented 1 month ago

I don't use easy-motion and other plugins like flash.nvim, leap etc don't have these issues. Noice also doesn't add any enters anywhere.