yetone / avante.nvim

Use your Neovim like using Cursor AI IDE!
Apache License 2.0
6.92k stars 250 forks source link

Thoughts on using default diff mode of neovim #313

Open nexplor opened 2 months ago

nexplor commented 2 months ago

Right now, avante re-implements a lot of functionality for viewing and accepting diffs that can be handled by plain neovim. Instead of modifying the buffer to include all of avante's suggestions, we could open a new vertical split which differs according to the suggestions, and replace these keymaps:

This has the following advantages:

I can send a PR for this if there is interest.

will-lynas commented 2 months ago

There's also diffview.nvim which is quite popular

pidgeon777 commented 2 months ago

Implementing vertical "diffing" could be a valuable addition. Additionally, integrating optional support for diffview.nvim would likely satisfy many users.

We could also conduct an experiment to determine if these features enhance usability.

aarnphm commented 2 months ago

diffview.nvim is hard to do, since they have their own tab management interface. For ppl who don't use tabpage, then navigation is very hard.

I don't think there will be one-solution-fit-all case. Seems like what ppl want is to have different view.

trevorwhitney commented 1 month ago

I'd like to second the idea of using the native split view and the native key bindings of do and dp. This workflow is already so engrained in me for resolving git conflicts or looking at git diffs it would be really nice to not have to remember another paradigm.

IMO targeting the native diff functionality (rather than the paradigms of a specific plugin) is going to appeal to the widest audience, and should probably be the first step.

aarnphm commented 4 weeks ago

I don't have an opinion about supporting native diff view. Just never use diff in neovim myself (simply I get used to the workflow in the terminal)

btw I only think diff view makes sense if you are doing multiple changes at multiple places in the file. Otherwise it just seems unnecessary.