CopilotC-Nvim / CopilotChat.nvim

Chat with GitHub Copilot in Neovim
https://copilotc-nvim.github.io/CopilotChat.nvim/
GNU General Public License v3.0
1.44k stars 67 forks source link

Error executing luv callback #358

Closed Artem-Schander closed 2 months ago

Artem-Schander commented 2 months ago

I have freshly installed this plugin. Unfortunately it seems to be broken.

neovim version: 0.9.5 plugin manager: lazy.nvim lazy config:

{
    "zbirenbaum/copilot.lua",
    event = {"VimEnter"},
    config = function ()
        vim.schedule(function ()
            require("copilot").setup({
                -- cmp = {
                --     enabled = true,
                --     method = "getCompletionsCycling",
                -- },
                -- panel = { -- no config options yet
                --     enabled = true,
                -- },
                -- ft_disable = { "markdown" },
                plugin_manager_path = get_runtime_dir() .. "/site/pack/packer",
            })
        end)
    end
},
{
    "CopilotC-Nvim/CopilotChat.nvim",
    branch = "canary",
    dependencies = {
        { "zbirenbaum/copilot.lua" }, -- or github/copilot.vim
        { "nvim-lua/plenary.nvim" }, -- for curl, log wrapper
    },
    opts = {
        debug = true, -- Enable debugging
        -- See Configuration section for rest
        window = {
            layout = 'float',
            relative = 'cursor',
            width = 1,
            height = 0.4,
            row = 1
        }
    },
    -- See Commands section for default commands if you want to lazy load on them
},

:checkhealth CopilotChat

==============================================================================
CopilotChat: require("CopilotChat.health").check()

CopilotChat.nvim [core] ~
- OK nvim: NVIM v0.9.5
  Build type: Release
  LuaJIT 2.1.1692716794

  system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/local/share/nvim"

  Run :checkhealth for more info

CopilotChat.nvim [commands] ~
- OK curl: curl 8.4.0 (x86_64-apple-darwin22.0) libcurl/8.4.0 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.11 nghttp2/1.51.0
  Release-Date: 2023-10-11
  Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
  Features: alt-svc AsynchDNS GSS-API HSTS HTTP2 HTTPS-proxy IPv6 Kerberos Largefile libz MultiSSL NTLM NTLM_WB SPNEGO SSL threadsafe UnixSockets
- OK git: git version 2.45.2

CopilotChat.nvim [dependencies] ~
- OK plenary: installed
- OK copilot: copilot.lua
- WARNING tiktoken_core: missing, optional for token counting. See README for installation instructions.
- OK treesitter[markdown]: installed
- WARNING treesitter[diff]: missing, optional for better diff highlighting. Install "nvim-treesitter/nvim-treesitter" plugin and run ":TSInstall diff".

Error:

Error executing luv callback:
...ck/lazy/opt/CopilotChat.nvim/lua/CopilotChat/copilot.lua:496: attempt to index a nil value
stack traceback:
        ...ck/lazy/opt/CopilotChat.nvim/lua/CopilotChat/copilot.lua:496: in function 'on_done'
        ...ck/lazy/opt/CopilotChat.nvim/lua/CopilotChat/copilot.lua:332: in function '_user_on_exit'
        ...rvim/site/pack/lazy/opt/plenary.nvim/lua/plenary/job.lua:240: in function '_shutdown'
        ...rvim/site/pack/lazy/opt/plenary.nvim/lua/plenary/job.lua:46: in function <...rvim/site/pack/lazy/opt/plenary.nvim/lua/plenary/job.lua:37>
deathbeam commented 2 months ago

You have outdated plenary.nvim version, update it