assistant/codecompanion-nvim: add mappings - #740
Conversation
Add mappings for common commands in codecompanion-nvim
| inherit (lib.modules) mkIf mkMerge; | ||
| inherit (lib.nvim.binds) addDescriptionsToMappings mkSetBinding mkSetLuaBinding; | ||
|
|
||
| self = import ./codecompanion-nvim.nix {inherit lib;}; |
There was a problem hiding this comment.
don't do this, this is leftover code that we haven't refactored yet. you can get the options definition from the "top-level" function args (see above)
| @@ -3,9 +3,21 @@ | |||
| lib, | |||
| ... | |||
There was a problem hiding this comment.
| ... | |
| options, | |
| ... |
then you can access the mappings option as options.vim.assistant.codecompanion-nvim.mappings
see run-nvim for a full example
|
@NotAShelf what's the current policy regarding default keymaps? are we still adding them or? |
I am still not very keen on adding more, but I also don't want to discourage anyone from contributing. Since we're going to add a toggle in the future, I think they are okay... for now. |
|
Hi, what is the status of these mappings PR? I would like to use them. |
|
For whomever it may concern I converted the mappings to **NB! I change one mapping key. |
|
Hi, I totally forgot about this one. When I created this PR, I didn’t realize that these could be set up easily on your own. |
|
Well I got the mappings and commands from here. So it would be a good idea to either document these for easy visibility or add them as defaults imho. |
|
I see your point. Maybe there is a way to make these key bindings discoverable through the options search without assigning them default values. That said, this could still introduce some maintenance overhead if the plugin changes over time. Maybe it’s reasonable to expect users to check the plugin themselves to see which commands are available. |
There should prolly be a pinned Issue about keymappings, also encouring the usage of |
I tried out the
codecompanion-nvimplugin and noticed, there were no mappings available, so I mapped some common commands of the plugin.Maybe @ArmandoCIII could take a look too.
Sanity Checking
nix fmt).#nix(default package).#maximal.#docs-html(manual, must build).#docs-linkcheck(optional, please build if adding links)x86_64-linuxaarch64-linuxx86_64-darwinaarch64-darwinAdd a 👍 reaction to pull requests you find important.