Ensure you have the following plugins installed:
- plenary.nvim
- copilot.vim (recommended) or copilot.lua
You will also need curl. Neovim should ship with copy of curl by default so most likely you are fine.
After getting copilot.vim or copilot.lua make sure to run :Copilot setup
or :Copilot auth
to retrieve your token if its not cached already.
Also make sure to run :UpdateRemotePlugins
to cleanup the old python commands.
Removed or changed params that you pass to setup
:
disable_extra_info
was removed. Now you can use keybinding to show current selection in chat on demand.hide_system_prompt
was removed. Now you can use keybinding to show current system prompt in chat on demand.language
was removed and is now part ofselection
asselection.filetype
CopilotChatBuffer
was removed (now exists asselect.buffer
selector forselection
)CopilotChatInPlace
was removed (parts of it were merged to default chat interface, and floating window now exists asfloat
config forwindow.layout
)CopilotChat
now functions asCopilotChatVisual
, the unnamed register selection now exists asselect.unnamed
selectorCopilotChatVsplitToggle
was renamed toCopilotChatToggle
CopilotChat.code_actions.show_help_actions
was reworked. Now you can use:
local actions = require("CopilotChat.actions")
require("CopilotChat.integrations.telescope").pick(actions.help_actions())
CopilotChat.code_actions.show_prompt_actions
was reworked. Now you can use:
local actions = require("CopilotChat.actions")
local select = require("CopilotChat.select")
require("CopilotChat.integrations.telescope").pick(actions.prompt_actions({
selection = select.visual,
}))
local chat = require('CopilotChat')
local select = require('CopilotChat.select')
chat.setup {
-- Restore the behaviour for CopilotChat to use unnamed register by default
selection = select.unnamed,
-- Restore the format with ## headers as prefixes,
question_header = '## User ',
answer_header = '## Copilot ',
error_header = '## Error ',
}
-- Restore CopilotChatVisual
vim.api.nvim_create_user_command('CopilotChatVisual', function(args)
chat.ask(args.args, { selection = select.visual })
end, { nargs = '*', range = true })
-- Restore CopilotChatInPlace (sort of)
vim.api.nvim_create_user_command('CopilotChatInPlace', function(args)
chat.ask(args.args, { selection = select.visual, window = { layout = 'float' } })
end, { nargs = '*', range = true })
-- Restore CopilotChatBuffer
vim.api.nvim_create_user_command('CopilotChatBuffer', function(args)
chat.ask(args.args, { selection = select.buffer })
end, { nargs = '*', range = true })
-- Restore CopilotChatVsplitToggle
vim.api.nvim_create_user_command('CopilotChatVsplitToggle', chat.toggle, {})
For further reference, you can view @jellydn's configuration.
- For proxy support, this is needed: nvim-lua/plenary.nvim#559
- Delete rest of the python code? Or finish rewriting in place then delete - All InPlace features are done, per poll on discord delete the python code
- Check for curl availability with health check
- Add folds logic from python, maybe? Not sure if this is even needed
- Finish rewriting the authentication request if needed or just keep relying on copilot.vim/lua - Relies on copilot.vim/lua
- Properly get token file path, atm it only supports Linux (easy fix)
- Update README and stuff
- Add token count from tiktoken support to extra_info
- Add test and fix failed test in CI