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

Don't hardcode key mappings

Open fgsch opened this issue 2 years ago • 4 comments

Currently, the key mappings are hardcoded. This overrides other mappings after calling oatmeal for the first time.

fgsch avatar Dec 06 '23 15:12 fgsch

Good call, fixed in https://github.com/dustinblackman/oatmeal.nvim/commit/4724ae262b2b9d3f14a80968c4f587de207b102a. Thanks!

dustinblackman avatar Dec 07 '23 03:12 dustinblackman

Thanks for the fix.

Could I convince you to drop the key mappings altogether and show how the user can do this themselves? My problem with the current mechanism is that it's duplicating what I do with lazy:

{
   "dustinblackman/oatmeal.nvim",
   keys = {
      { "<leader>co", mode = { "n", "v" }, desc = "Start Oatmeal session" },
   },
   opts = {
      hotkey = "<leader>co",
      backend = "ollama",
      model = "codellama:latest",
   },
}

so the plugin can be loaded lazily, and I can have a description. I was looking around to see how other plugins deal with this, and in my brief search, they don't appear to set default mappings.

fgsch avatar Dec 07 '23 23:12 fgsch

Got a few example plugins you were looking in to? I'm down to keep things consistent with other plugins.

dustinblackman avatar Dec 08 '23 00:12 dustinblackman

Sure, I had a look at:

  • https://github.com/nvim-telescope/telescope.nvim
  • https://github.com/lewis6991/gitsigns.nvim
  • https://github.com/folke/trouble.nvim

fgsch avatar Dec 08 '23 01:12 fgsch