Accept diff is not working on `gitcommit` anymore
Hi, thank you create the powerful plugin.
I upgraded the plugin recently and I found the <c-y> is broken on the gitcommit.
My workflow is described below:
- open
fugitive - call
:Git committo open thegitcommitwindow - call
CopilotChatCommit - call
<c-y>to put the commit messages to thegitcommitwindow
The workflow works fine until I upgrade the plugin.
I try to debug the why and I found the copilot.chat:get_closest_block() return
{
content = "fix(yarepl): correct aider source syntax property\n\nChanges the configuration property from 'source_func' to 'source_syntax' to \nmatch the expected configuration parameter name in yarepl plugin.",
end_line = 15,
header = {
filename = "code-block",
filetype = "gitcommit"
},
start_line = 12
}
and get_diff return nil.
hope the info can help you
I also have this issue
I am having this issue as well
https://github.com/deathbeam/dotfiles/blob/master/nvim/.config/nvim/lua/config/copilot.lua#L62
you probably need want to do this, for accepting diff you need to have selection with just generic code blocks so the plugin knows the range to replace
thanks @deathbeam
@deathbeam this seems to have regressed since the selection changes, and i noticed that you have removed the selection from your config (https://github.com/deathbeam/dotfiles/commit/5b9a8be8a3e983466298054177279e8086a72784) obviously, as it doesnt exist anymore
Is there a new recommened approach?
@deathbeam this seems to have regressed since the selection changes, and i noticed that you have removed the selection from your config (deathbeam/dotfiles@5b9a8be) obviously, as it doesnt exist anymore
Is there a new recommened approach?
Yea was deciding what to do mostly (was considering keybind to replace whole buffer) but just did this for now:
https://github.com/CopilotC-Nvim/CopilotChat.nvim/pull/1370
Now it will out of the box and will try to generate replacement for the buffer
Amazing, thank you for everything!