-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
feat: adding mini.diff module as inline diff mechanism #210
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should give users the choice of a provider i.e. default
or mini_diff
. I think we should hardcode the revert_delay
in too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a setting called config.display.inline.diff.diff_method
that can be set to either default
or mini_diff
. I'm not sure if this is what you asking for.
I also removed the revert_delay
setting and replaced it with a hardcoded value.
This looks really promising. Very exciting to have in the plugin. Once you're happy with the PR I'll merge into |
This PR is ready unless there're other reviews. Here are some notes:
Thank you! |
Great work! However, I am wondering why CodeCompanion decides to define custom keymaps for reject and accept (
Thoughts? |
@bassamsdata this look's awesome. Only non-value add ask is if we can rename references such as @S1M0N38 haha because the author has absolutely no idea about using diff's in Neovim 😆. |
Sure, I made the change right away. I'm juggling multiple things at the moment, including Python, R, Golang, and Lua, so my brain got a bit mixed up since each language prefers a different naming convention. My bad! @S1M0N38 This is cool! I’ve been using Neovim for 2 years, but I haven’t really done any diffing in the editor. It feels like there’s always something new to learn in Neovim. |
@bassamsdata thanks so much. I'll merge now. I've been using Neovim for the best part of 4 years and never even knew diffing could be done natively until I saw @S1M0N38's dante plugin the other week 😆. |
Hey @bassamsdata...I've reworked how we handle diff's in version 3.0.0 of the plugin...the result is I've broken your |
Description
Adding the Mini.diff module as an option for the inline feature, offering an alternative to Neovim's original diff mode, which works between two buffers. With this, the diff will appear inline in the same buffer.
Related Issue(s)
The initial discussion happened here: #154
The PR is not finished yet; this is just a starting point. I placed the module in a new file due to its size, making it easier to maintain.
Currently, this PR has the following issues that aren’t working properly:
original_buffer_content
doesn’t capture the correct buffer to compare against (possibly can be retrieved fromself.context.lines
).Checklist