Open wookayin opened 1 year ago
Thank you for your advices!
.setup{}
is there to allow users to only load plugin when they want and avoid the unexpected behaviors.vim.keymap.set("i", "<tab>", "<plug>(smart-tab)")
works in my config. Can you share more detailed situation?Hey! Sorry to be a burden on this, really loved the simplicity of your plugin. My only suggestion here is possible table of differences between similar plugins (tabout, actual helix functionality.. else?) Anyways - Great work and a cool idea :)
Hi, thanks for the great plugin and the idea looks very interesting. Here are some feedbacks/improvements that you can consider regarding plugin init/config:
Ideally, a plugin should be working without an explicit
.setup{}
call.Consider using
plugin/*.lua
to definevim.keymap.set("i", "<plug>(smart-tab)", smart_tab)
because the plugin explicitly requires to import (require)lua/smart-tab.lua
in order to work.Manual keymap(smart-tab)` literally.
vim.keymap.set("i", "<tab>", "<plug>(smart-tab)")
does not work because remap is false by default. One will need the{ remap = true }
option. So the current behavior is like inserting the string 'Error handling should be added on buffers with no treesitter parser configured (or even filetype='').
A question: Why buffer-local keymap is created rather than a global keymap? This would work in almost all the cases except for when plugin is loaded lazily.
Minor nitpcking: space should be preferred over tabs.