ayamir / nvimdots

A well configured and structured Neovim.
BSD 3-Clause "New" or "Revised" License
2.95k stars 459 forks source link

overlapping keymap of which-key #1325

Closed Penguin-SAMA closed 4 months ago

Penguin-SAMA commented 4 months ago

Version confirmation

Following prerequisites

Neovim version

NVIM v0.10.0

Branch info

main (Default/Latest)

Minimal (user) folder structure required to reproduce the issue

/user
├── configs
│   ├── dap-clients
│   ├── editor
│   │   └── visual-multi.lua
│   ├── formatters
│   └── lsp-servers
├── event.lua
├── keymap
│   ├── completion.lua
│   ├── core.lua
│   ├── editor.lua
│   ├── init.lua
│   ├── lang.lua
│   ├── tool.lua
│   └── ui.lua
├── options.lua
├── plugins
│   ├── editor.lua
│   ├── leetcode.lua
│   ├── nvim-surround.lua
│   └── xmake.lua
└── settings.lua

Minimal config with steps on how to reproduce the issue

When I open neovim, the following pop-up window always appear:

image

I use :checkhealth which-key The information output is as follows:


==============================================================================
which-key: require("which-key.health").check()

- OK Most of these checks are for informational purposes only.
  WARNINGS should be treated as a warning, and don't necessarily indicate a problem with your config.
  Please |DON't| report these warnings as an issue.
- WARNING |mini.icons| is not installed
- OK |nvim-web-devicons| is installed

Checking for issues with your mappings ~
- WARNING You're using an old version of the which-key spec.
  Your mappings will work, but it's recommended to update them to the new version.
  Please check the docs and suggested spec below for more info.
  Mappings: >
  {
    ["<leader>"] = {
      S = {
        name = "󰍉 Search"
      },
      W = {
        name = " Window"
      },
      b = {
        name = "󰓩 Buffer"
      },
      d = {
        name = " Debug"
      },
      f = {
        name = " Fuzzy Find"
      },
      g = {
        name = "󰊢 Git"
      },
      l = {
        name = "󱜙 Lsp"
      },
      n = {
        name = " Nvim Tree"
      },
      p = {
        name = " Package"
      },
      s = {
        name = " Session"
      }
    }
  }

  -- Suggested Spec:
  {
    { "<leader>S", group = "󰍉 Search" },
    { "<leader>W", group = " Window" },
    { "<leader>b", group = "󰓩 Buffer" },
    { "<leader>d", group = " Debug" },
    { "<leader>f", group = " Fuzzy Find" },
    { "<leader>g", group = "󰊢 Git" },
    { "<leader>l", group = "󱜙 Lsp" },
    { "<leader>n", group = " Nvim Tree" },
    { "<leader>p", group = " Package" },
    { "<leader>s", group = " Session" },
  }

checking for overlapping keymaps ~
- WARNING In mode `n`, <t> overlaps with <tj>, <to>, <tn>, <tk>:
  - <tj>: tab: Move to previous tab
  - <to>: tab: Only keep current tab
  - <tn>: tab: Create a new tab
  - <tk>: tab: Move to next tab
- WARNING In mode `n`, <s> overlaps with <spacefg>, <spacefc>, <spaceff>, <spacefd>, <spacefm>, <spacefp>:
  - <s>: Flash
- WARNING In mode `n`, <yS> overlaps with <ySS>:
  - <yS>: Add a surrounding pair around a motion, on new lines (normal mode)
  - <ySS>: Add a surrounding pair around the current line, on new lines (normal mode)
- WARNING In mode `n`, <ys> overlaps with <yss>:
  - <ys>: Add a surrounding pair around a motion (normal mode)
  - <yss>: Add a surrounding pair around the current line (normal mode)
- WARNING In mode `n`, <gc> overlaps with <gcc>:
  - <gc>: edit: Toggle comment for line with operator
  - <gcc>: edit: Toggle comment for line
- WARNING In mode `n`, <gb> overlaps with <gbc>:
  - <gb>: edit: Toggle comment for block with operator
  - <gbc>: edit: Toggle comment for block
- OK Overlapping keymaps are only reported for informational purposes.
  This doesn't necessarily mean there is a problem with your config.

Checking for duplicate mappings ~
- OK No duplicate mappings found

At the same time, when I use , the pop-up prompt also has the problem of duplicate icons:

image

Expected behavior

I'd like to know how to check and modify these overlapping keymappings, and what causes the duplicate icons.

Additional information

No response

CharlesChiuGit commented 4 months ago

1323 #1324