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

Enhancement: Make it easier to disable Copilot #93

Closed
olimorris opened this issue Dec 12, 2022 · 2 comments
Closed

Enhancement: Make it easier to disable Copilot #93

olimorris opened this issue Dec 12, 2022 · 2 comments

Comments

@olimorris
Copy link

I've been travelling a lot in the last two weeks; planes and trains with dodgy internet connection. One of my most frustrating issues is that I keep getting the following error, with every keystroke:

RPC[Error] code_name = InternalError, message = "Request getCompletions failed with message: getaddrinfo ENOTFOUND api.github.com"

My config is:

M.copilot = function()
  local ok, copilot = om.safe_require("copilot")
  if not ok then return end

  copilot.setup({
    panel = {
      auto_refresh = true,
    },
    suggestion = {
      auto_trigger = true, -- Suggest as we start typing
      keymap = {
        accept_word = "<C-l>",
        accept_line = "<C-j>",
      },
    },
  })
end

I get around this by doing require("copilot.suggestion").toggle_auto_trigger() but doing it in every buffer is a real nuisance.

It would be great if there was a command to turn it off entirely.

@MunifTanjim
Copy link
Collaborator

Until the solution mentioned in #74 (comment) is implemented, you can set auto_trigger = false in the config.

And run :Copilot suggestion toggle_auto_trigger when you want to enable copilot? (btw, you don't need to type that whole command, auto-complete is supported).

@olimorris
Copy link
Author

Yeah really good point. I'll close this as had missed #74 !

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

2 participants