Skip to content
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

Customize number of lines of context in diff #91

Open
tadamcz opened this issue Sep 27, 2023 · 1 comment
Open

Customize number of lines of context in diff #91

tadamcz opened this issue Sep 27, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@tadamcz
Copy link

tadamcz commented Sep 27, 2023

Thank you for making this plugin and open sourcing it!

Have you considered supporting the --unified flag?

-U<n>
--unified=<n>
Generate diffs with lines of context instead of the usual three. Implies --patch.

To begin with, making this an option in the plugin settings would be great.

(To be even more sophisticated, the plugin could set --unified dynamically based on the diff, for example to the largest value that will still allow the diff+prompt to fit in the context)

@tadamcz tadamcz changed the title Support more lines of context Customize number of lines of context in diff Sep 27, 2023
@Blarc
Copy link
Owner

Blarc commented Jan 27, 2024

I am using IntelliJ's com.intellij.openapi.diff.impl.patch.UnifiedDiffWriter for creating prompt. This way I only use changes that are picked in the commit dialog. I can't find any other implementation of diff writer in IntelliJ API and am not ready to write my own, because it's a pretty complex.

@Blarc Blarc added the enhancement New feature or request label Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants