feat: remove copilot, reenable codeium
This commit is contained in:
6
flake.lock
generated
6
flake.lock
generated
@@ -20,11 +20,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1706098335,
|
"lastModified": 1707786466,
|
||||||
"narHash": "sha256-r3dWjT8P9/Ah5m5ul4WqIWD8muj5F+/gbCdjiNVBKmU=",
|
"narHash": "sha256-yLPfrmW87M2qt+8bAmwopJawa+MJLh3M9rUbXtpUc1o=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "a77ab169a83a4175169d78684ddd2e54486ac651",
|
"rev": "01885a071465e223f8f68971f864b15829988504",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
/opt/pwnvim/github-copilot
|
|
||||||
@@ -11,8 +11,7 @@ require("lazy").setup({
|
|||||||
spec = {
|
spec = {
|
||||||
-- add LazyVim and import its plugins
|
-- add LazyVim and import its plugins
|
||||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||||
-- { import = "lazyvim.plugins.extras.coding.codeium" },
|
{ import = "lazyvim.plugins.extras.coding.codeium" },
|
||||||
{ import = "plugins.coding.copilot" },
|
|
||||||
{ import = "lazyvim.plugins.extras.lang.docker" },
|
{ import = "lazyvim.plugins.extras.lang.docker" },
|
||||||
{ import = "lazyvim.plugins.extras.lang.go" },
|
{ import = "lazyvim.plugins.extras.lang.go" },
|
||||||
{ import = "lazyvim.plugins.extras.lang.java" },
|
{ import = "lazyvim.plugins.extras.lang.java" },
|
||||||
|
|||||||
@@ -1,87 +0,0 @@
|
|||||||
return {
|
|
||||||
|
|
||||||
-- copilot
|
|
||||||
{
|
|
||||||
"zbirenbaum/copilot.lua",
|
|
||||||
cmd = "Copilot",
|
|
||||||
build = ":Copilot auth",
|
|
||||||
opts = {
|
|
||||||
suggestion = { enabled = true },
|
|
||||||
panel = { enabled = true },
|
|
||||||
filetypes = {
|
|
||||||
yaml = true,
|
|
||||||
markdown = true,
|
|
||||||
help = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"nvim-lualine/lualine.nvim",
|
|
||||||
optional = true,
|
|
||||||
event = "VeryLazy",
|
|
||||||
opts = function(_, opts)
|
|
||||||
local Util = require("lazyvim.util")
|
|
||||||
local colors = {
|
|
||||||
[""] = Util.ui.fg("Special"),
|
|
||||||
["Normal"] = Util.ui.fg("Special"),
|
|
||||||
["Warning"] = Util.ui.fg("DiagnosticError"),
|
|
||||||
["InProgress"] = Util.ui.fg("DiagnosticWarn"),
|
|
||||||
}
|
|
||||||
table.insert(opts.sections.lualine_x, 2, {
|
|
||||||
function()
|
|
||||||
local icon = require("lazyvim.config").icons.kinds.Copilot
|
|
||||||
local status = require("copilot.api").status.data
|
|
||||||
return icon .. (status.message or "")
|
|
||||||
end,
|
|
||||||
cond = function()
|
|
||||||
if not package.loaded["copilot"] then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
local ok, clients = pcall(require("lazyvim.util").lsp.get_clients, { name = "copilot", bufnr = 0 })
|
|
||||||
if not ok then
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
return ok and #clients > 0
|
|
||||||
end,
|
|
||||||
color = function()
|
|
||||||
if not package.loaded["copilot"] then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
local status = require("copilot.api").status.data
|
|
||||||
return colors[status.status] or colors[""]
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- copilot cmp source
|
|
||||||
{
|
|
||||||
"nvim-cmp",
|
|
||||||
dependencies = {
|
|
||||||
{
|
|
||||||
"zbirenbaum/copilot-cmp",
|
|
||||||
dependencies = "copilot.lua",
|
|
||||||
opts = {},
|
|
||||||
config = function(_, opts)
|
|
||||||
local copilot_cmp = require("copilot_cmp")
|
|
||||||
copilot_cmp.setup(opts)
|
|
||||||
-- attach cmp source whenever copilot attaches
|
|
||||||
-- fixes lazy-loading issues with the copilot cmp source
|
|
||||||
require("lazyvim.util").lsp.on_attach(function(client)
|
|
||||||
if client.name == "copilot" then
|
|
||||||
copilot_cmp._on_insert_enter({})
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
---@param opts cmp.ConfigSchema
|
|
||||||
opts = function(_, opts)
|
|
||||||
table.insert(opts.sources, 1, {
|
|
||||||
name = "copilot",
|
|
||||||
group_index = 1,
|
|
||||||
priority = 100,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user