Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Popupmenu completion experience #337

Open
Wsine opened this issue Nov 7, 2024 · 0 comments
Open

Popupmenu completion experience #337

Wsine opened this issue Nov 7, 2024 · 0 comments

Comments

@Wsine
Copy link

Wsine commented Nov 7, 2024

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant