From ed1c1a6f690fb0473f301c23dfb74ec0251e60f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sat, 6 Jan 2024 11:45:54 +0100 Subject: [PATCH] feat(nvim): switch back to copilot --- flake.lock | 24 ------------------- flake.nix | 5 ---- modules/programs/nvim/plugins/coding.nix | 15 +++++++++++- .../programs/nvim/plugins/lua/nvim-cmp.lua | 6 ++--- overlays/vimPlugins.nix | 2 -- 5 files changed, 17 insertions(+), 35 deletions(-) diff --git a/flake.lock b/flake.lock index 912fdce..f66e5e8 100644 --- a/flake.lock +++ b/flake.lock @@ -71,29 +71,6 @@ "type": "github" } }, - "codeium-nvim": { - "inputs": { - "flake-utils": [ - "flake-utils" - ], - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1701196468, - "narHash": "sha256-xZ1S+8NgxOurbYqh7n3wR3cw+FTP8DyCdb5lg7X+8kw=", - "owner": "jcdickinson", - "repo": "codeium.nvim", - "rev": "fd9c9030d402baf2a01cc9db08c39772c0a60324", - "type": "github" - }, - "original": { - "owner": "jcdickinson", - "repo": "codeium.nvim", - "type": "github" - } - }, "darwin": { "inputs": { "nixpkgs": [ @@ -1054,7 +1031,6 @@ "agenix": "agenix", "arkenfox-userjs": "arkenfox-userjs", "asus-touchpad-numpad-driver": "asus-touchpad-numpad-driver", - "codeium-nvim": "codeium-nvim", "devshell": "devshell", "disko": "disko", "flake-parts": "flake-parts", diff --git a/flake.nix b/flake.nix index c1ced19..b5fd476 100644 --- a/flake.nix +++ b/flake.nix @@ -29,11 +29,6 @@ # Neovim actions-preview-nvim.flake = false; actions-preview-nvim.url = "github:aznhe21/actions-preview.nvim"; - codeium-nvim = { - inputs.nixpkgs.follows = "nixpkgs"; - inputs.flake-utils.follows = "flake-utils"; - url = "github:jcdickinson/codeium.nvim"; - }; hmts-nvim.flake = false; hmts-nvim.url = "github:calops/hmts.nvim"; neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay"; diff --git a/modules/programs/nvim/plugins/coding.nix b/modules/programs/nvim/plugins/coding.nix index 4b2526c..774b1af 100644 --- a/modules/programs/nvim/plugins/coding.nix +++ b/modules/programs/nvim/plugins/coding.nix @@ -76,8 +76,21 @@ with builtins; { plugin = cmp-nvim-lsp; } { plugin = cmp_luasnip; } { - plugin = codeium-nvim; + plugin = copilot-cmp; opts = { }; + dependencies = [ + { + plugin = copilot-lua; + opts = { + suggestion = { enabled = false; }; + panel = { enabled = false; }; + }; + conf = /* lua */ '' + require("copilot").setup(opts) + vim.cmd("Copilot disable") + ''; + } + ]; } { plugin = friendly-snippets; } { plugin = lspkind-nvim; } diff --git a/modules/programs/nvim/plugins/lua/nvim-cmp.lua b/modules/programs/nvim/plugins/lua/nvim-cmp.lua index 516c869..abe86bb 100644 --- a/modules/programs/nvim/plugins/lua/nvim-cmp.lua +++ b/modules/programs/nvim/plugins/lua/nvim-cmp.lua @@ -17,7 +17,7 @@ cmp.setup({ maxwidth = 50, -- prevent the popup from showing more than provided characters ellipsis_char = "...", -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead symbol_map = { - Codeium = "", + Copilot = "", }, }), }, @@ -56,7 +56,7 @@ cmp.setup({ { name = "async_path", priority = 1 }, { name = "buffer", priority = 1 }, { name = "luasnip", priority = 2 }, - { name = "codeium", priority = 3 }, + { name = "copilot", priority = 3 }, { name = "nvim_lsp", priority = 3 }, }, }) @@ -213,4 +213,4 @@ end vim.api.nvim_create_user_command("CmpToggle", sources_picker, {}) -- disable sources by default -disable_source("codeium") +-- disable_source("codeium") diff --git a/overlays/vimPlugins.nix b/overlays/vimPlugins.nix index 1a4f6c8..2f4c01f 100644 --- a/overlays/vimPlugins.nix +++ b/overlays/vimPlugins.nix @@ -4,8 +4,6 @@ _: prev: with lib.my; { vimPlugins = prev.vimPlugins // { - inherit (inputs.codeium-nvim.packages.${prev.system}.vimPlugins) codeium-nvim; - smartcolumn-nvim = prev.vimUtils.buildVimPlugin { pname = "smartcolumn-nvim"; version = mkVersionInput inputs.smartcolumn-nvim;