Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to remove default which-key keybindings config #92

Open
brymon68 opened this issue Sep 29, 2024 · 1 comment
Open

Unable to remove default which-key keybindings config #92

brymon68 opened this issue Sep 29, 2024 · 1 comment

Comments

@brymon68
Copy link

brymon68 commented Sep 29, 2024

I am trying to completely disable all default which-key bindings (besides those defined in my keymaps) but have been unsuccessful.

In my plugins/which-key.lua file I have:

return {
  "folke/which-key.nvim",
  event = "VeryLazy",
  init = function()
    vim.o.timeout = true
    vim.o.timeoutlen = 500
  end,
  keys = function()
    return {} -- <--should remove all default mappings
  end
}

I have tried overriding defaults as well as overriding keys but have been unsuccessful. Am I missing something?

@brymon68 brymon68 changed the title Unable to delete default which-key config Unable to remove default which-key keybindings config Sep 29, 2024
@rbrgmn
Copy link

rbrgmn commented Nov 14, 2024

I use the following hack.

./config/nvim/lua/plugins/default_bindings_disabled.lua:

return {
  {
    "LazyVim/LazyVim",
    opts = {
      defaults = {
        -- Disable all default key bindings
        keymaps = false,
      },
    },
  },
}

This setup will give you complete control over all key mappings in LazyVim, allowing only the ones you define.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants