fix(copilot): remove load on BufReadPost instead of InsertEnter

This commit is contained in:
Folke Lemaitre 2025-01-31 20:10:48 +01:00
parent 4a81a370d7
commit 8f4e9b8c1e
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -5,11 +5,12 @@ return {
"zbirenbaum/copilot.lua", "zbirenbaum/copilot.lua",
cmd = "Copilot", cmd = "Copilot",
build = ":Copilot auth", build = ":Copilot auth",
event = "InsertEnter", event = "BufReadPost",
opts = { opts = {
suggestion = { suggestion = {
enabled = not vim.g.ai_cmp, enabled = not vim.g.ai_cmp,
auto_trigger = true, auto_trigger = true,
hide_during_completion = vim.g.ai_cmp,
keymap = { keymap = {
accept = false, -- handled by nvim-cmp / blink.cmp accept = false, -- handled by nvim-cmp / blink.cmp
next = "<M-]>", next = "<M-]>",