Closed stounfo closed 1 month ago
NVIM v0.10.0 Build type: Release LuaJIT 2.1.1720049189
MacOS 14.3
If I use a string as a second parameter to wk.Spec in a nested mapping (expand) the mapping doesn't work.
text "doesnt work" should be printed
No response
vim.env.LAZY_STDPATH = ".repro" load( vim.fn.system( "curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua" ) )() require("lazy.minit").repro({ spec = { { "folke/which-key.nvim", opts = { spec = { { "?", expand = function() return { { "f", "<cmd> echo 'doesnt work'<cr>" }, -- <- this mapping doesn't work { "s", function() print("work") -- <- this mapping works fine end, }, } end, }, }, }, }, }, })
Dynamic mappings only support functions (since they're not real mappings). I've updated the docs to reflect this.
Did you check docs and existing issues?
Neovim version (nvim -v)
NVIM v0.10.0 Build type: Release LuaJIT 2.1.1720049189
Operating system/version
MacOS 14.3
Describe the bug
If I use a string as a second parameter to wk.Spec in a nested mapping (expand) the mapping doesn't work.
Steps To Reproduce
Expected Behavior
text "doesnt work" should be printed
Health
No response
Log
No response
Repro