-
Notifications
You must be signed in to change notification settings - Fork 4
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
Remapping <CR> in normal mode #9
Comments
Also, why do you only close GPT windows when exiting vim, if the default mapping was used? Shouldn't this line be outside the if in lua/nvim-gpt.lua line 25?
|
Ah, finally found my mistake. I was calling setup() in another config file as well. The correct invocation is:
But of course that doesn't work if you have another place where you call it without passing no_default_keymaps. Leaving this open solely to suggest that the logic be inverted, so that mappings are opt-in instead of opt-out. |
Also note that this causes the quickfix list to be broken, as |
Well-behaved plugins don't define mappings (except for buffertypes they define themselves). They put suggested mappings in the readme, for users to copy into their configuration themselves. Or they allow an option to enable some set of keybindings, but the default should be not to define keymappings. The idea being that if you just install a bunch of plugins without further configuration, they won't conflict, and also that no plugin will overwrite an existing user mapping without some sort of opt-in from the user.
nvim-gpt.lua has:
But adding those two autocmd's (uncommented) to my vimrc.vim (at the start, at the end, or both) has not removed the mappings. Nor do I see how that is supposed to work.
I see the readme does mention no_default_keymaps = true being available, but I'm still trying to figure out how to use that. I guess you mean to add something like this to a lua vimrc:
But that doesn't work either.
The text was updated successfully, but these errors were encountered: