From d3b07a2e772ce70fda0dab8f677973ba22aa3b2d Mon Sep 17 00:00:00 2001 From: Daniel Lundin Date: Thu, 7 Nov 2024 17:57:44 +0100 Subject: [PATCH] nvim: Add neocodium --- home/common/nvim/default.nix | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/home/common/nvim/default.nix b/home/common/nvim/default.nix index f9de77f..5e3ef01 100644 --- a/home/common/nvim/default.nix +++ b/home/common/nvim/default.nix @@ -22,6 +22,7 @@ extraPackages = with pkgs; [ black + codeium cue go gopls @@ -76,6 +77,36 @@ targets-vim ts-comments-nvim + { + plugin = codeium-nvim; + type = "lua"; + config = '' + require'codeium'.setup { + enable_chat = false, + } + ''; + } + + { + plugin = pkgs.vimUtils.buildVimPlugin { + name = "neocodeium"; + src = pkgs.fetchFromGitHub { + owner = "monkoose"; + repo = "neocodeium"; + rev = "4da81528468b33585c411f31eb390dce573ccb14"; # v1.8.0 + hash = "sha256-1n9nNqBNwNDSzbAkm8eB4HZLNy5HmMg25jPwQAnW5OU="; + }; + }; + type = "lua"; + config = '' + local neocodeium =require('neocodeium') + neocodeium.setup() + vim.keymap.set("i", "", neocodeium.accept, { remap = true }) + vim.keymap.set("i", "", neocodeium.accept, { remap = true }) + vim.keymap.set("i", "", neocodeium.cycle_or_complete, { remap = true }) + ''; + } + { plugin = pkgs.vimUtils.buildVimPlugin { name = "diagflow"; @@ -154,7 +185,7 @@ } { - plugin = nvim-treesitter-textobjects; # helix-style selection of TS tree + plugin = nvim-treesitter-textobjects; type = "lua"; config = '' require'nvim-treesitter.configs'.setup { @@ -178,7 +209,7 @@ } { - plugin = nvim-lspconfig; # Interface for LSPs + plugin = nvim-lspconfig; type = "lua"; config = lib.fileContents ./lsp.lua; }