Closed opakholis closed 2 years ago
the output of nvim -v
NVIM v0.7.0-dev+1416-g012c05580
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by opxop@local
Features: +acl +iconv +tui
See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/local/share/nvim"
Run :checkhealth for more info
Try this:
use {
"zbirenbaum/copilot.lua",
event = "InsertEnter",
config = function()
vim.schedule(function
require("copilot.copilot_handler").start({ plugin_manager_path = vim.fn.expand "$HOME" .. "/.local/share/lunarvim/" })
end)
end,
},
The reason this popped up is because there's more than one config option now, so it needs to be specified.
i dont really understand, sorry. now another message pops up
if i add site/pack/packer/
like so
require("copilot.copilot_handler").start {
-- plugin_manager_path = vim.fn.expand "$HOME" .. "/.local/share/lunarvim/",
plugin_manager_path = vim.fn.expand "$HOME" .. "/.local/share/lunarvim/site/pack/packer",
}
the error message popped up when I entered insert mode
if i add
site/pack/packer/
like sorequire("copilot.copilot_handler").start { -- plugin_manager_path = vim.fn.expand "$HOME" .. "/.local/share/lunarvim/", plugin_manager_path = vim.fn.expand "$HOME" .. "/.local/share/lunarvim/site/pack/packer", }
the error message popped up when I entered insert mode
Sorry, for the delay, I didn't notice you responded and github didn't send a notification for some reason. The config handler was doing some really weird stuff. I deleted everything and rewrote it properly. I tested out that snippet but with my own path and its working fine now. Don't call copilot_handler.start directly, thats where the on_attach error came from. That was a a workaround before I wrote a real setup function.
Just do this in your packer use:
use {
"zbirenbaum/copilot.lua",
event = {"InsertEnter"},
config = function()
vim.schedule(function()
require("copilot").setup({
plugin_manager_path = vim.fn.expand "$HOME" .. "/.local/share/lunarvim/site/pack/packer",
})
end)
end,
},
that's working now, thanks for your help @zbirenbaum
im using LunarVim + nvim head branch, and get this message error at startup
so i replace my config following this solution because LunarVim things 😆, but still getting the same error message