copilot.lua
copilot.lua copied to clipboard
Popupmenu completion experience
I observed that if a copilot suggestion is presented, the suggestion will not disappear when the popup menu is shown (e.g., nvim-cmp). Change the config to the following can help to improve the experience.
local suggestion = require("copilot.suggestion")
cmp.event:on("menu_opened", function()
if suggestion.is_visible() then
suggestion.dismiss()
end
vim.b.copilot_suggestion_hidden = true
end)
cmp.event:on("menu_closed", function()
vim.b.copilot_suggestion_hidden = false
suggestion.next()
end)
I would expect most people to want to see the ghost text and the LSP menu at the same time, since they would typically show different things.
Is this because you have Copilot also running with nvim-cmp?
Closing as stale