commander.nvim
commander.nvim copied to clipboard
`vim.keymap.set`
This looks really nice, but I have a suggestion:
With the (almost there) release of nvim 0.7, :h vim.keymap.set()
was introduced. Maybe this could take similar syntax, but with an additional description
field? This would make it both easier for the user (they do not need to change much about their configs, if they were to start using this plugin), and for the developer (they can just forward everything to vim.keymap.set())
Interesting idea. I will look into this once I have time.
just to clarify @dtomvan, you are proposing to mimic the interface right? not to depend on it. I don't think that api should be used since the current release of nvim is still 0.6.1,and most people will just have that.
I believe 0.7 is going to be released today. Even if I am going to introduce a new interface to add commands to command_center based on the new API, I will definitely not remove the old interface nor the support for the previous version of neovim.
With ecb8b488584807bd14eddb1443b0797e3033bdcc, command_center
now lets you to pass a Lua function as a command.
With ecb8b48,
command_center
now lets you to pass a Lua function as a command. That's awesome, extra flexibility does that require neovim 0.7?
Supposedly, if you want use lua function, you'd have to use neovim 0.7 because it requires the new api. Otherwise, you can stick with 0.6 (see this section)
However, I've tested this on 0.6.1, and it worked... not sure why.
awesome, thanks for the clarification
Supposedly, if you want use lua function, you'd have to use neovim 0.7 because it requires the new api. Otherwise, you can stick with 0.6 (see this section)
However, I've tested this on 0.6.1, and it worked... not sure why.
Ok, here is how it works:
If you are on neovim 0.6, then you can add a Lua function as a cmd
and execute it in command_center
, but you are not able to bind it to a keymap.
If you are on neovim 0.7, then you can both bind the Lua function to a keymap and execute it in command_center
.
Hope this clear things up
that looks perfect. Thank you very much for this
El sáb., 16 abr. 2022 20:43, Feiyou Guo @.***> escribió:
Supposedly, if you want use lua function, you'd have to use neovim 0.7 because it requires the new api. Otherwise, you can stick with 0.6 (see this section https://github.com/FeiyouG/command_center.nvim#command_centeradd )
However, I've tested this on 0.6.1, and it worked... not sure why.
Ok, here is how it works:
If you are on neovim 0.6, then you can add a Lua function as a cmd and execute it in command_center, but you are not able to bind it to a keymap.
If you are on neovim 0.7, then you can both bind the Lua function to a keymap and execute it in command_center.
Hope this clear things up
— Reply to this email directly, view it on GitHub https://github.com/FeiyouG/command_center.nvim/issues/2#issuecomment-1100729900, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARKJWLI3SZUXGQYLXXSWKTVFMC43ANCNFSM5THW7PZA . You are receiving this because you commented.Message ID: @.***>