Skip to content

Accepting change in diff view and/or adding highlighting groups for diff #1574

Description

@dagl1

When asking to create a change, copilot will generate text (sometimes long), but the visual indication of what that change will be is difficult to assess other than reading the code. Moving to closest diff does move my cursor there, but it doesn't clearly indicate what the change will be. Viewing the show_diff window does clearly show what would be changed with this particular change, but from here accepting appears impossible.

It would be nice if it was;

  1. Possible to accept the change after viewing it in the show_diff view
  2. If the change itself could more clearly indicate/highlight (both in the copilot chat window) as in the text. Possibly by giving it a treesitter/LSP designation that would then allow for a highlight group.

See for example the following picture:

Image

The change entails the uncommenting of two lines of code. The moving to closest diff identifies the code block that change would be affecting, however the actual diff isn't highlighted, neither in the original buffer, nor in the chat window.

The show_diff does properly show it but the accept change isn't working while viewing it in this manner:

Image

Assuming I didn't frack up a setting or miss some particular config, I think it would be great if there was clearer indication of the overall changes that would be applied.

-Dagl

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions