which-key.nvim
which-key.nvim copied to clipboard
use vim.keymap.set for keymaps
problem: this is only a latest commit thing on nightly. There is no stable release with it and some people can't even get this version with their package manager
Does this allow passing lua functions as RHS to which-key? or does which-key do some typechecking that would get in the way of that?
yes it does (I have a fork where I do this)
I don't think this PR changes anything. which-key.nvim
already supports Lua functions as RHS, it currently just wraps them to be called from non-Lua mappings, and this PR just adds a redundant extra layer of mapping.
vim.keymap.set is more than justfunction() end
it also allows function references
But this PR never passes a function reference to vim.keymap.set()
. It only passes a string.
no it can also pass a function reference
It never does this. Have you even read the source code?
require('which-key.keys').map()
is NOT a public interface. Sure you can call it directly, but what is the point of that?
I have if you pass a function reference then the type wouldn't be function and I just had to disable a type check on my fork and everything worked
Oh, I missed your second comment. This PR doesn't disable the type check though.
its now on stable! 0.7.0
@max397574, I saw you're working on this on your fork. Is it ready?
yes ig
Hi @max397574, this pull request does not solve #310 , right?
I've pushed an update that utilizes the new api for callbacks and also sets the desc
attribute on Neovim 0.7 or higher