folke / which-key.nvim

💥 Create key bindings that stick. WhichKey helps you remember your Neovim keymaps, by showing available keybindings in a popup as you type.
Apache License 2.0
5.12k stars 163 forks source link

bug: align mode set to 'center' does not work and breaks which-key #752

Closed Houdiee closed 1 month ago

Houdiee commented 1 month ago

Did you check docs and existing issues?

Neovim version (nvim -v)

0.9.5

Operating system/version

Linux Gentoo

Describe the bug

Settings the layout align to 'center' instead of the default value 'left', causes which-key to break and no longer pop up. I have searched for solution and even tried setting opts.win.col = 0.5, but this also did not work.

Steps To Reproduce

in my plugins.lua file (lazy package manager): { "folke/which-key.nvim", event = "VeryLazy", opts = { preset = 'modern', icons = { rules = false }, layout = { align = 'center '}, },

Expected Behavior

Should align the modules from the center.

Health

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 ~
- OK No issues reported

checking for overlapping keymaps ~
- OK No overlapping keymaps found

Checking for duplicate mappings ~
- OK No duplicate mappings found

Log

No response

Repro

No response

folke commented 1 month ago

That option was no longer used, and could not break wk in any way, so somthing else must have been messed up in your config.

If you think this is still a bug, provide a proper repro as is instructed in the issue template.