Are changes from copilot cli supposed to be seen on the editor? #280
Replies: 3 comments 1 reply
-
|
To integrate changes from the Copilot CLI into Neovim for review, you need to ensure that the CLI writes the files to disk. Once the files are saved, To review file changes made by the CLI within Neovim, you can use a workflow like this: 1. Ensure CLI writes to diskIf you are using the Copilot CLI within the # Start copilot with write permissions if it's not the default
copilot --allow-tool 'write'2. Triggering Diffs in Sidekick
If the CLI modifies a file on disk, Neovim will update the buffer. If you want the specific "Accept/Decline" UI for those changes, you are looking for Next Edit Suggestions. These are typically triggered automatically by the LSP as you type or move the cursor, rather than being a direct "pipe" from the CLI terminal output to the NES UI. Why you might not see the "Accept" UI
Tip To get the best of both worlds, use the CLI for large structural changes or refactors, and rely on the NES (which If you want to review changes the CLI made using a diff view, you might prefer using a git integration like Does the CLI successfully modify the file on your disk, or are the changes only appearing inside the terminal window? |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the thorough reply. Now I understand how it works. Copilot already has write access, and buffers are updated with code changed by copilot. But No diffs are displayed by the LSP. I guess there is some issue with the LSP server I will have to dig into that. But now I at least know what to start to focus on :-) |
Beta Was this translation helpful? Give feedback.
-
|
I sadly did not mannage to make it work. The files are updated more or less directly in the buffer when copilot cli writes changes. But I do not gett any accept/reject posibility through the NES. I have copilot LSP running and I get inline suggestions, it's just not working with sidekick. here is a output from checkhealth vim.lsp if it helps. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I have configured sidekick according to the examples and also installed the copilot lsp server through mason. She. Opening github copilot cli from within nvim and ask it to edit code. The code is of course updated. But I cannot in nvim editor accept or decline chunks of code that copilot cli updated. Is that intended to work with sidekick or have I misunderstood the plugin?
Beta Was this translation helpful? Give feedback.
All reactions