diff --git a/flake.lock b/flake.lock index cf2fb19..3eee7ee 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1706098335, - "narHash": "sha256-r3dWjT8P9/Ah5m5ul4WqIWD8muj5F+/gbCdjiNVBKmU=", + "lastModified": 1707786466, + "narHash": "sha256-yLPfrmW87M2qt+8bAmwopJawa+MJLh3M9rUbXtpUc1o=", "owner": "nixos", "repo": "nixpkgs", - "rev": "a77ab169a83a4175169d78684ddd2e54486ac651", + "rev": "01885a071465e223f8f68971f864b15829988504", "type": "github" }, "original": { diff --git a/github-copilot b/github-copilot deleted file mode 120000 index c21874c..0000000 --- a/github-copilot +++ /dev/null @@ -1 +0,0 @@ -/opt/pwnvim/github-copilot \ No newline at end of file diff --git a/nvim/lua/config/lazy.lua b/nvim/lua/config/lazy.lua index 55f748b..5d77fa0 100644 --- a/nvim/lua/config/lazy.lua +++ b/nvim/lua/config/lazy.lua @@ -11,8 +11,7 @@ require("lazy").setup({ spec = { -- add LazyVim and import its plugins { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - -- { import = "lazyvim.plugins.extras.coding.codeium" }, - { import = "plugins.coding.copilot" }, + { import = "lazyvim.plugins.extras.coding.codeium" }, { import = "lazyvim.plugins.extras.lang.docker" }, { import = "lazyvim.plugins.extras.lang.go" }, { import = "lazyvim.plugins.extras.lang.java" }, diff --git a/nvim/lua/plugins/coding/copilot.lua b/nvim/lua/plugins/coding/copilot.lua deleted file mode 100644 index 6dae184..0000000 --- a/nvim/lua/plugins/coding/copilot.lua +++ /dev/null @@ -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, - }, -}