zbirenbaum / copilot.lua

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

Copilot Panel Doesnt Generate anything #307

Open ThaiDuy12345 opened 1 month ago

ThaiDuy12345 commented 1 month ago

I have tried all of the filetypes like typescript, python, none of them were working but suggestion work fine tho If you guys can see the Copilot icon in the statusline which reference the copilot status using the plugin Copilot-lualine, it showed a slash on the copilot icon which maybe it wasn't working ? I think so

https://github.com/user-attachments/assets/87797e2e-04e7-4ee9-905f-e3c80fceb000

My spec: nvim: 0.10.1 WSL - Ubuntu 20.04

My config:

    "zbirenbaum/copilot.lua",
    keys = require("keymap").copilot_keymaps,
    cmd = "Copilot",
    event = "VimEnter",
    config = function ()
      require('copilot').setup({
        panel = {
          enabled = true,
          auto_refresh = false,
          keymap = {
            jump_prev = "[[",
            jump_next = "]]",
            accept = "<CR>",
            refresh = "gr",
            open = "<M-CR>"
          },
          layout = {
            position = "right", -- | top | left | right
            ratio = 0.4
          },
        },
        suggestion = {
          enabled = true,
          auto_trigger = true,
          hide_during_completion = true,
          debounce = 75,
          keymap = {
            accept = "<tab>",
            accept_word = false,
            accept_line = false,
            next = "<M-]>",
            prev = "<M-[>",
            dismiss = "<C-]>",
          },
        },
        filetypes = {
          ["*"] = true,
        },
        copilot_node_command = 'node', -- Node.js version must be > 18.x
        server_opts_overrides = {},
})
    end
devboy commented 2 weeks ago

Having the same issue, using the default configuration. Suggestions in insert mode work though.