-
Notifications
You must be signed in to change notification settings - Fork 4
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
fix: support all whichkey methods #82
Conversation
Minimal repro here local wk = require("which-key.mappings")
local str = [[
return {
w = {
name = "file", -- optional group name
o = { ":lua print('hello')<CR>", "Find File" }, -- create a binding with label
n = {
function()
print("bar")
end,
"Foobar",
}, -- you can also pass functions!
},
}, { prefix = "<leader>" }
]]
-- local str = [[
-- return ({
-- ["<leader>wf"] = { ':lua print("hello")<CR>', "hello" },
-- })
-- ]]
local obj = loadstring(str)()
print(vim.inspect(obj))
local wkd = wk.parse(obj)
print(vim.inspect(wkd))
|
Okay, i think the issue is fixed, but I don't know why the test for the which-key message is now failing.... *edit, that took me an embarrassingly long time to fix... To explain more there was a few issues at play. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clearer comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm - loadstring can definitely be tricky, it would be good if we could figure out an alternative at some point though I'm not sure what that would be.
closes #81
needs further work on method1
I don't really understand the structure though as the section just gets dropped seemingly
@willothy any ideas?