lean.nvim icon indicating copy to clipboard operation
lean.nvim copied to clipboard

Provide option to unbind default <Tab> and <CR> bindings for abbreviation expansion

Open ElectronSutra opened this issue 1 year ago • 1 comments

Hello!

I'm a big fan of the plugin and have been using it for class.

I would like the option to unbind <Tab> and <CR> from expanding abbreviations, without also disabling abbreviations entirely. If someone (like me) has an insane personal preference for using keys other than <Tab> and <CR> for completion, it can be annoying to hit <Tab> for indenting the line and then get an expansion instead.

It is currently easy to map another key to expand abbreviations, using the require("lua.abbreviations").convert() function. I believe it would also be nice to either:

  1. Allow for keymaps = false in config.abbreviations in order to not bind <Tab> and <CR>, or
  2. Allow for config.mappings = false to remove those bindings.

Thank you -- your plugin has really saved my butt in my Formal Methods class becuase now I don't need to leave Neovim to do my coursework!

ElectronSutra avatar Oct 03 '24 02:10 ElectronSutra

(Thanks for the kind words!)

I think this sounds reasonable + doable. I have a few other things I'm immediately trying to finish with the plugin, but I'll try to have a look at this at least to form an opinion on your 2 possibilites in the next few days.

Julian avatar Oct 07 '24 22:10 Julian