LazyVim fails to load Copilot extra, "No healthcheck found" after clean install #1998
Unanswered
hoanggxyuuki
asked this question in
Q&A
Replies: 1 comment
-
If you're using LazyVim the distro, then just enable the Copilot and CopilotChat Extras. Just press |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone, I'm having trouble getting GitHub Copilot and Copilot Chat to work with LazyVim. I've followed all the standard setup steps, including a full clean reinstall, but the plugin fails to load.
Symptoms:
What I've tried:
Here is my current ~/.config/nvim/init.lua:
-- ~/.config/nvim/init.lua
require("config.lazy")
And here is my ~/.config/nvim/lua/plugins/copilot.lua:
-- ~/.config/nvim/lua/plugins/copilot.lua
return {
{
"CopilotC-Nvim/CopilotChat.nvim",
branch = "main", -- Luôn dùng branch chính
dependencies = {
{ "github/copilot.vim" }, -- Đảm bảo plugin chính được load
},
-- Thêm hàm 'config' để gọi setup một cách thủ công
config = function(_, opts)
require("CopilotChat").setup(opts)
end,
-- 'opts' sẽ được truyền vào hàm config ở trên
opts = {
-- Bạn có thể thêm các tùy chỉnh giao diện ở đây nếu muốn
-- ví dụ: auto_insert_mode = true,
},
-- 'keys' sẽ định nghĩa các phím tắt của bạn
keys = {
-- F2: Hoạt động tốt với require, giữ nguyên
{
"",
function()
require("CopilotChat").toggle()
end,
mode = "n",
desc = "Copilot - Mở/Đóng Chat (F2)",
},
-- F3: Dùng vim.cmd. Lần này nó sẽ hoạt động vì .setup() đã được gọi
{
"",
function()
vim.cmd('CopilotChatEdit')
end,
mode = "v",
desc = "Copilot - Chỉnh sửa code (F3)",
},
-- F4: Dùng vim.cmd tương tự F3
{
"",
function()
vim.cmd('CopilotChatFixDiagnostic')
end,
mode = "n",
desc = "Copilot - Sửa lỗi nhanh (F4)",
},
},
},
}
I am already logged into my GitHub account with Copilot access. My Neovim version is:
NVIM v0.12.0-dev-438+ga6e2c22347
Build type: RelWithDebInfo
LuaJIT 2.1.1744317938
Any ideas what could be wrong with my environment that prevents LazyVim from loading the Copilot plugins? Thanks!"
Beta Was this translation helpful? Give feedback.
All reactions