Improved Text Retrieval & Split-Screen Window#8
Improved Text Retrieval & Split-Screen Window#8sudhanshu19102003 wants to merge 3 commits intoCopilotC-Nvim:mainfrom
Conversation
it only contains the text from the most recent yank, delete, change, or put operation, if there were no changes it didn't gave any output so i changed it to nvim.current.buffer[:]
|
I've implemented a similar approach on my fork jellydn@97fcd70 I think the view mode/option should be configured. return {
-- Import the copilot plugin
{ import = "lazyvim.plugins.extras.coding.copilot" },
{
"jellydn/CopilotChat.nvim",
branch = "canary",
opts = {
mode = "split"
},
build = function()
vim.defer_fn(function()
vim.cmd("UpdateRemotePlugins")
vim.notify("CopilotChat - Updated remote plugins. Please restart Neovim.")
end, 3000)
end,
event = "VeryLazy",
keys = {
{ "<leader>cce", "<cmd>CopilotChatExplain<cr>", desc = "CopilotChat - Explain code" },
{ "<leader>cct", "<cmd>CopilotChatTests<cr>", desc = "CopilotChat - Generate tests" },
},
},
} |
|
Ya that's great but we still have to change the |
I am not sure about it. Let's see @gptlang view on your PR. |
|
I completely missed this PR. Lost access to my email and didn't get notifications. Just fixed it recently. Sorry abut that (which is why i got notification of closing) |
|
After looking at it a bit more, I agree with @jellydn's approach of being able to configure it (even though I do split pretty much 99% of the time) |
|
|
||
| # Get code from the unnamed register | ||
| code = self.nvim.eval("getreg('\"')") | ||
| code = self.nvim.current.buffer[:] |
There was a problem hiding this comment.
Would this pass the whole file in the buffer in or just the visible part?
There was a problem hiding this comment.
The whole file which is opened currently
Changes Made
Tip
nvim.current.eval("getreg('"')") :


It only contains the text from the most recent yank, delete, change, or put operation, if there were no changes it didn't give any output
Before
After