johmsalas / text-case.nvim

An all in one plugin for converting text case in Neovim
452 stars 18 forks source link

Warning from which-key due to use of deprecated register function #169

Closed j-hui closed 4 months ago

j-hui commented 4 months ago

From :checkhealth which-key:

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: >
  {
    ga = {
      name = "text-case"
    },
    mode = "x",
    noremap = true,
    nowait = true,
    silent = true
  }

  -- Suggested Spec:
  {
    { "ga", group = "text-case", mode = "x", nowait = true, remap = false },
  }
- 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: >
  {
    ga = {
      name = "Pending mode operator"
    },
    mode = "x",
    noremap = true,
    nowait = true,
    silent = true
  }

  -- Suggested Spec:
  {
    { "ga", group = "Pending mode operator", mode = "x", nowait = true, remap = false },
  }

This appears to be caused by text-case.nvim calling whichkey.register, which is deprecated. Instead, text-case.nvim should call whichkey.add when available.

johmsalas commented 4 months ago

Thanks for the detailed explanation and for fixing it 🙇