WIP: Fix which-key v3 API migration and resolve keymap overlap #5

Closed
Copilot wants to merge 2 commits from copilot/fix-which-key-warnings into main
Copilot commented 2025-11-19 13:12:10 +00:00 (Migrated from github.com)

Health check warnings indicated use of deprecated which-key API and overlapping keymaps between <leader>t and <leader>td.

Changes

  • lua/plugins/ai.lua: Migrated from wk.register() to wk.add() for which-key v3 compatibility
  • lua/plugins/git.lua: Moved gitsigns toggle deleted from <leader>td<leader>hT to eliminate overlap and group with other hunk operations (hr, hR, hb, hd, hD)
# Before
wk.register({ { "<leader>a", group = "opencode" } })
map('n', '<leader>td', gitsigns.toggle_deleted, 'Toggle deleted')

# After
wk.add({ { "<leader>a", group = "opencode" } })
map('n', '<leader>hT', gitsigns.toggle_deleted, 'Toggle deleted')

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • esm.ubuntu.com
    • Triggering command: /usr/lib/apt/methods/https (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

==============================================================================
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.

Checking your config ~

  • ⚠️ 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: >
    { { "a",
    group = "opencode"
    } }

    -- Suggested Spec:
    {
    { "", group = "opencode" },
    }

checking for overlapping keymaps ~

  • ⚠️ WARNING In mode n, overlaps with :
    • : Toggle comment
    • : Toggle comment line
  • ⚠️ WARNING In mode n, overlaps with , :
    • : Find left surrounding
    • : Find previous left surrounding
    • : Find next left surrounding
  • ⚠️ WARNING In mode n, overlaps with , :
    • : Find right surrounding
    • : Find previous right surrounding
    • : Find next right surrounding
  • ⚠️ WARNING In mode n, overlaps with , :
    • : Highlight surrounding
    • : Highlight previous surrounding
    • : Highlight next surrounding
  • ⚠️ WARNING In mode n, overlaps with , :
    • : Replace surrounding
    • : Replace previous surrounding
    • : Replace next surrounding
  • ⚠️ WARNING In mode n, overlaps with , :
    • : Delete surrounding
    • : Delete previous surrounding
    • : Delete next surrounding
  • ⚠️ WARNING In mode n, <t> overlaps with <td>:
    • <t>: Open new empty tab
  • 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

Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Health check warnings indicated use of deprecated which-key API and overlapping keymaps between `<leader>t` and `<leader>td`. ## Changes - **lua/plugins/ai.lua**: Migrated from `wk.register()` to `wk.add()` for which-key v3 compatibility - **lua/plugins/git.lua**: Moved gitsigns toggle deleted from `<leader>td` → `<leader>hT` to eliminate overlap and group with other hunk operations (`hr`, `hR`, `hb`, `hd`, `hD`) ```lua # Before wk.register({ { "<leader>a", group = "opencode" } }) map('n', '<leader>td', gitsigns.toggle_deleted, 'Toggle deleted') # After wk.add({ { "<leader>a", group = "opencode" } }) map('n', '<leader>hT', gitsigns.toggle_deleted, 'Toggle deleted') ``` > [!WARNING] > > <details> > <summary>Firewall rules blocked me from connecting to one or more addresses (expand for details)</summary> > > #### I tried to connect to the following addresses, but was blocked by firewall rules: > > - `esm.ubuntu.com` > - Triggering command: `/usr/lib/apt/methods/https` (dns block) > > If you need me to access, download, or install something from one of these locations, you can either: > > - Configure [Actions setup steps](https://gh.io/copilot/actions-setup-steps) to set up my environment, which run before the firewall is enabled > - Add the appropriate URLs or hosts to the custom allowlist in this repository's [Copilot coding agent settings](https://github.com/dikkadev/nvim/settings/copilot/coding_agent) (admins only) > > </details> <!-- START COPILOT CODING AGENT SUFFIX --> <details> <summary>Original prompt</summary> > ============================================================================== > 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. > > Checking your config ~ > - ⚠️ 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>a", > group = "opencode" > } } > > -- Suggested Spec: > { > { "", group = "opencode" }, > } > > checking for overlapping keymaps ~ > - ⚠️ WARNING In mode `n`, <gc> overlaps with <gcc>: > - <gc>: Toggle comment > - <gcc>: Toggle comment line > - ⚠️ WARNING In mode `n`, <sF> overlaps with <sFl>, <sFn>: > - <sF>: Find left surrounding > - <sFl>: Find previous left surrounding > - <sFn>: Find next left surrounding > - ⚠️ WARNING In mode `n`, <sf> overlaps with <sfl>, <sfn>: > - <sf>: Find right surrounding > - <sfl>: Find previous right surrounding > - <sfn>: Find next right surrounding > - ⚠️ WARNING In mode `n`, <sh> overlaps with <shl>, <shn>: > - <sh>: Highlight surrounding > - <shl>: Highlight previous surrounding > - <shn>: Highlight next surrounding > - ⚠️ WARNING In mode `n`, <sr> overlaps with <srl>, <srn>: > - <sr>: Replace surrounding > - <srl>: Replace previous surrounding > - <srn>: Replace next surrounding > - ⚠️ WARNING In mode `n`, <sd> overlaps with <sdl>, <sdn>: > - <sd>: Delete surrounding > - <sdl>: Delete previous surrounding > - <sdn>: Delete next surrounding > - ⚠️ WARNING In mode `n`, <<Space>t> overlaps with <<Space>td>: > - <<Space>t>: Open new empty tab > - ✅ 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 </details> <!-- START COPILOT CODING AGENT TIPS --> --- ✨ Let Copilot coding agent [set things up for you](https://github.com/dikkadev/nvim/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot) — coding agent works faster and does higher quality work when set up for your repo.
dikkadev (Migrated from github.com) reviewed 2025-11-19 13:12:10 +00:00

Pull request closed

Sign in to join this conversation.
No description provided.