Skip to content

assistant/codecompanion-nvim: add mappings #740

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Sc3l3t0n
Copy link
Contributor

I tried out the codecompanion-nvim plugin 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

  • I have updated the changelog as per my changes (I'm not sure if I should, because the plugin is new in this release)
  • I have tested, and self-reviewed my code
  • My changes fit guidelines found in hacking nvf
  • Style and consistency
    • I ran Alejandra to format my code (nix fmt)
    • My code conforms to the editorconfig configuration of the project
    • My changes are consistent with the rest of the codebase
  • If new changes are particularly complex:
    • My code includes comments in particularly complex areas
    • I have added a section in the manual
    • (For breaking changes) I have included a migration guide
  • Package(s) built:
    • .#nix (default package)
    • .#maximal
    • .#docs-html (manual, must build)
    • .#docs-linkcheck (optional, please build if adding links)
  • Tested on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin

Add a 👍 reaction to pull requests you find important.

Add mappings for common commands in codecompanion-nvim
@Sc3l3t0n Sc3l3t0n requested a review from NotAShelf as a code owner March 24, 2025 16:45
github-actions bot pushed a commit that referenced this pull request Mar 24, 2025
Copy link

🚀 Live preview deployed from df1b3f7

View it here:

Debug Information

Triggered by: Sc3l3t0n

HEAD at: feature/mappings-for-codecompanion

Reruns: 480


self = import ./codecompanion-nvim.nix {inherit lib;};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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,
...
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
...
options,
...

then you can access the mappings option as options.vim.assistant.codecompanion-nvim.mappings

see run-nvim for a full example

@horriblename
Copy link
Collaborator

@NotAShelf what's the current policy regarding default keymaps? are we still adding them or?

@NotAShelf
Copy link
Owner

@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.

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

Successfully merging this pull request may close these issues.

3 participants