folke / which-key.nvim

💥 Create key bindings that stick. WhichKey helps you remember your Neovim keymaps, by showing available keybindings in a popup as you type.
Apache License 2.0
5.42k stars 177 forks source link

Which key conflicts with plugins like vim-sandwich #95

Closed rolfst closed 4 months ago

rolfst commented 3 years ago

Hi when I doe a checkhealth which_key I get the following:

health#which_key#check
========================================================================
## WhichKey: checking conflicting keymaps
  - WARNING: conflicting keymap exists for mode **"n"**, lhs: **"sr"**
  - INFO: rhs: `<Plug>(operator-sandwich-replace)<Plug>(operator-sandwich-release-count)<Plug>(textobj-sandwich-query-a)`
  - WARNING: conflicting keymap exists for mode **"n"**, lhs: **"sd"**
  - INFO: rhs: `<Plug>(operator-sandwich-delete)<Plug>(operator-sandwich-release-count)<Plug>(textobj-sandwich-query-a)`
  - WARNING: conflicting keymap exists for mode **"n"**, lhs: **"gc"**
  - INFO: rhs: `:set operatorfunc=CommentOperator<CR>g@`
  - WARNING: buffer-local keymap overriding global for mode **"n"**, buf: 0, lhs: **" "**
  - INFO: old rhs: `<NOP>`
  - INFO: new rhs: `<cmd>lua require("which-key").show(" ", {mode = "n", auto = true})<cr>`

I also noticed that when I press "`" or '"' i get the preset popup for matching and registers but this makes it impossible to change a surround.

folke commented 3 years ago

You can safely ignore these warnings. It simply means that WhichKey won't be able to trigger for keymaps under sr for example, which is fine.

What do you mean exactly with impossible to change a surround? Please describe the exact steps that don;t work for you.

rolfst commented 3 years ago

well when using sandwich-nvim I would normally use sr or sa to respectively replace or add a surround but which-key makes this impossible. exactly as as you said in your reply above. is there a way to change the conflicting keys from which-key? So I place my cursor at the beginning of a word and then I press saw" to surround it with a " and this fails and I just enter insert-mode

ignu commented 2 years ago

@rolfst did you ever solve this? currently having a sophies choice between whichkey or sandwich or diving in the rabbit hole of solving this.

github-actions[bot] commented 4 months ago

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.