Closed TheElegantCoding closed 1 year ago
Want to ask, what would be the benefits of using a command there instead of a lua function call? Why would it be more flexible?
When I mean flexible, it is because you don't need a keymap to execute a command of codewindow you can execute the command from CMD like this :Codewindow toggle
Also a lot of people use this command to search for help like :Codewindow help
I know this repo don't have the doc yet but it is a example
And if I want to organize my keymap y don't have to import and call the plugin, I just put my keymap, so I can move and put the keymap in another files without requiring anything
For now I recommend adding in the command yourself when configuring the plugin, as this is a bit out of the scope of the current version. I'll consider it when actually getting to rewrite the plugin.
hi for now the only way to keymap this plugin is this
keymap('n', '<leader>mm', codewindow.toggle_minimap, { desc = 'toggle minimap' })
but it would be nice and more flexible to have the option of a command in the cmd
keymap('n', '<leader>mm', '<cmd>Codewindow toggle_minimap<cr>', { desc = 'toggle minimap' })
basically commands like this
':Codewindow toggle'