Github copilot doesn't work but its enabled and online for nvim config

275 Views Asked by At

The GitHub copilot don't suggest code but its enabled and online

return {
  {
    "ThePrimeagen/vim-be-good",
  },
  {
    -- github 
    "zbirenbaum/copilot.lua",
    cmd = "Copilot",
    build = ":Copilot auth",
    opts = {
      suggestion = { enabled = false },
      panel = { enabled = false },
      filetypes = {
        markdown = true,
        help = true,
      },
    },
  },
  {
    "mbbill/undotree",
    config = function()
      vim.keymap.set("n", "<leader>nn", vim.cmd.UndotreeToggle)
    end,
  },
}

This the file for config using

I want to see suggest for GitHub copilot in the code when typing.

1

There are 1 best solutions below

1
Francis A On

I can see in your config code that the suggestion option is set to false suggestion = { enabled = false }, which may be the reason you're not seeing code suggestions from GitHub Copilot while typing.

You will need to update the config to enable suggestions in your Neovim setup.

For GitHub Copilot suggestions to work, just modify the opts table like this;

opts = { suggestion = { enabled = true }, -- Enable suggestions panel = { enabled = false }, filetypes = {  markdown = true,    help = true,  },},