zbirenbaum / copilot-cmp

Lua plugin to turn github copilot into a cmp source
MIT License
1.13k stars 41 forks source link

Debouncing suggestions? #69

Closed Firaenix closed 1 year ago

Firaenix commented 1 year ago

I've noticed a huge amount of traffic going to the copilot servers, every time I type, it sends off a message. Is it possible to debounce this by like 350ms or something so the plugin isnt so aggressive? My config is as follows:

{
    "zbirenbaum/copilot.lua",
    event = "InsertEnter",
    config = function()
      require("copilot").setup({
        suggestion = { enabled = false },
        panel = { enabled = false },
      })
    end
  },
  {
    "zbirenbaum/copilot-cmp",
    dependencies = { "zbirenbaum/copilot.lua" },
    event = "InsertEnter",
    config = function()
      require("copilot_cmp").setup()
    end
  },

I am using lazy.nvim for package management within AstroNvim

Firaenix commented 1 year ago

Never mind, I guess it was because of my cmp settings which showed the prompt on every keystroke.