zbirenbaum / copilot.lua

Fully featured & enhanced replacement for copilot.vim complete with API for interacting with Github Copilot
MIT License
2.45k stars 67 forks source link

Copilot disable gives this error #168

Closed niksingh710 closed 1 year ago

niksingh710 commented 1 year ago

image

MunifTanjim commented 1 year ago

How are you setting up copilot?

niksingh710 commented 1 year ago
{
    "zbirenbaum/copilot-cmp",
    dependencies = {
      "zbirenbaum/copilot.lua",
      config = function()
        require("copilot").setup({
          -- suggestion = { enabled = false },
          panel = { enabled = false },
          filetypes = {
            yaml = true,
            markdown = true,
            help = true,
            gitcommit = true,
            gitrebase = true,
            hgcommit = true,
            svn = true,
            cvs = true,
            ["."] = true,
          },
          suggestion = {
            enabled = true,
            auto_trigger = true,
            debounce = 75,
            keymap = {
              accept = "<c-l>",
              next = "<c-]>",
              prev = "<c-[>",
              dismiss = "<C-]>",
            },
          },
        })
      end,
      -- cmd = "Copilot",
      -- event = "InsertEnter",
    },

using Lazy.nvim

after creating the issue i observed that if i manually type Copilot disable then it throws the error but if i type Copilot and then press tab that shows the available options list and i choose disable from there and the press enter it works fine.

MunifTanjim commented 1 year ago

Are you using the latest version? Run :Copilot version to check.


copilot.vim 1.8.4
copilot.lua 653bbdc44cd569a5fd0617e5a9d3df2b1359e230                                                                                   ```
niksingh710 commented 1 year ago

Are you using the latest version? Run :Copilot version to check.

copilot.vim 1.8.4
copilot.lua 653bbdc44cd569a5fd0617e5a9d3df2b1359e230                                                                                   ```

Neovim 0.9.0
copilot.vim 1.8.4
copilot.lua 653bbdc44cd569a5fd0617e5a9d3df2b1359e230
copilot/dist/agent.js 1.84.0
Node.js 18.14.0```
MunifTanjim commented 1 year ago

You're using the same keymap for both next = "<c-]>" and dismiss = "<C-]>". Change that and it should be solved.

niksingh710 commented 1 year ago

You're using the same keymap for both next = "<c-]>" and dismiss = "<C-]>". Change that and it should be sovled.

worked mate Thanks.........