Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't hardcode key mappings #5

Open
fgsch opened this issue Dec 6, 2023 · 4 comments
Open

Don't hardcode key mappings #5

fgsch opened this issue Dec 6, 2023 · 4 comments

Comments

@fgsch
Copy link

fgsch commented Dec 6, 2023

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

@fgsch fgsch changed the title Don't hardcode key mappings or command Don't hardcode key mappings Dec 6, 2023
@dustinblackman
Copy link
Owner

Good call, fixed in 4724ae2. Thanks!

@fgsch
Copy link
Author

fgsch commented Dec 7, 2023

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.

@dustinblackman
Copy link
Owner

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

@dustinblackman dustinblackman reopened this Dec 8, 2023
@fgsch
Copy link
Author

fgsch commented Dec 8, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants