copilot.lua icon indicating copy to clipboard operation
copilot.lua copied to clipboard

Popupmenu completion experience

Open Wsine opened this issue 1 year ago • 1 comments

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)

Wsine avatar Nov 07 '24 05:11 Wsine

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?

AntoineGS avatar Apr 14 '25 15:04 AntoineGS

Closing as stale

AntoineGS avatar Aug 28 '25 00:08 AntoineGS