goolord / alpha-nvim

a lua powered greeter like vim-startify / dashboard-nvim
MIT License
1.82k stars 109 forks source link

fix: support lua function keybind #152

Closed adoyle-h closed 1 year ago

adoyle-h commented 1 year ago

nvim_replace_termcodes(keybind) is redundant

goolord commented 1 year ago

button already supports lua functions https://neovim.io/doc/user/api.html#nvim_set_keymap()

When called from Lua, also accepts a "callback" key that takes a Lua function to call when the mapping is executed

the lua api is a bit more idiomatic but there's really no reason to break compatibility

adoyle-h commented 1 year ago

I changed it back to nvim_buf_set_keymap. Please review it again.

adoyle-h commented 1 year ago

@goolord Could you please review this PR?

goolord commented 1 year ago

PR looks fine, i'll test this branch soon & merge i suppose

adoyle-h commented 1 year ago

It get fixed in latest code.