whichkey.lua 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. require("which-key").setup {
  2. plugins = {
  3. marks = true, -- shows a list of your marks on ' and `
  4. registers = true, -- shows your registers on " in NORMAL or <C-r> in INSERT mode
  5. spelling = {
  6. enabled = true, -- show WhichKey when pressing z=
  7. suggestions = 50, -- amount of shown suggestions
  8. },
  9. -- the presets plugin, adds help for a bunch of default keybindings in Neovim
  10. presets = {
  11. operators = true, -- adds help for operators like d, y, ... and registers them for motion / text object completion
  12. motions = true, -- adds help for motions
  13. text_objects = true, -- help for text objects triggered after entering an operator
  14. windows = true, -- default bindings on <c-w>
  15. nav = true, -- misc bindings to work with windows
  16. z = true, -- bindings for folds, spelling and others prefixed with z
  17. g = true, -- bindings for prefixed with g
  18. },
  19. },
  20. -- add operators that will trigger motion and text object completion
  21. -- to enable all native operators, set the preset / operators plugin above
  22. operators = { gc = "Comments" },
  23. key_labels = {
  24. -- override the label used to display some keys. It doesn't effect WK in any other way.
  25. -- For example:
  26. -- ["<space>"] = "SPC",
  27. -- ["<cr>"] = "RET",
  28. -- ["<tab>"] = "TAB",
  29. },
  30. icons = {
  31. breadcrumb = "»", -- symbol used in the command line area that shows your active key combo
  32. separator = "➜", -- symbol used between a key and it's label
  33. group = "+", -- symbol prepended to a group
  34. },
  35. popup_mappings = {
  36. scroll_down = '<c-d>', -- binding to scroll down inside the popup
  37. scroll_up = '<c-u>', -- binding to scroll up inside the popup
  38. },
  39. window = {
  40. border = "none", -- none, single, double, shadow
  41. position = "bottom", -- bottom, top
  42. margin = { 1, 0, 1, 0 }, -- extra window margin [top, right, bottom, left]
  43. padding = { 2, 2, 2, 2 }, -- extra window padding [top, right, bottom, left]
  44. winblend = 0
  45. },
  46. layout = {
  47. height = { min = 4, max = 25 }, -- min and max height of the columns
  48. width = { min = 20, max = 50 }, -- min and max width of the columns
  49. spacing = 3, -- spacing between columns
  50. align = "left", -- align columns left, center or right
  51. },
  52. ignore_missing = false, -- enable this to hide mappings for which you didn't specify a label
  53. hidden = { "<silent>", "<cmd>", "<Cmd>", "<CR>", "call", "lua", "^:", "^ "}, -- hide mapping boilerplate
  54. show_help = true, -- show help message on the command line when the popup is visible
  55. triggers = "auto", -- automatically setup triggers
  56. triggers_blacklist = {
  57. -- list of mode / prefixes that should never be hooked by WhichKey
  58. -- this is mostly relevant for key maps that start with a native binding
  59. -- most people should not need to change this
  60. i = { "j", "k" },
  61. v = { "j", "k" },
  62. },
  63. }