diff --git a/.config/nvim/lua/neovim/packer.lua b/.config/nvim/lua/neovim/packer.lua index 883410ae..fdaf1441 100644 --- a/.config/nvim/lua/neovim/packer.lua +++ b/.config/nvim/lua/neovim/packer.lua @@ -93,4 +93,6 @@ return require("packer").startup(function(use) }, }, }) + -- codeium AI + use("Exafunction/codeium.vim") end) diff --git a/.config/nvim/lua/neovim/remap.lua b/.config/nvim/lua/neovim/remap.lua index 6ff3dff0..d9a05df8 100644 --- a/.config/nvim/lua/neovim/remap.lua +++ b/.config/nvim/lua/neovim/remap.lua @@ -33,12 +33,8 @@ vim.keymap.set("n", "x", "!chmod +x %", { silent = true }) -- Vimium Like Keybindings vim.keymap.set("n", "", ":tabnew", {}) -vim.keymap.set("n", "", ":tabprevious", {}) -vim.keymap.set("n", "", ":tabprevious", {}) +-- tab keybindings vim.keymap.set("n", "", ":tabprevious", {}) - -vim.keymap.set("n", "", ":tabnext", {}) -vim.keymap.set("n", "", ":tabnext", {}) vim.keymap.set("n", "", ":tabnext", {}) -- Use ctrl- [hl] to select the active split! vim.keymap.set("n", "", ":wincmd h", {}) @@ -137,3 +133,23 @@ vim.keymap.set("n", "dso", ":lua require'dap'.step_out()") vim.keymap.set("n", "dsi", ":lua require'dap'.step_into()") vim.keymap.set("n", "dcl", ":lua require'dap'.close()") -- vim.keymap.set("n", "dui", ":lua require('dapui').toggle()") +-- +-- codeium remappings +vim.keymap.set("i", "", function() + return vim.fn["codeium#Accept"]() +end, { expr = true }) +vim.keymap.set("i", "", function() + return vim.fn["codeium#CycleCompletions"](1) +end, { expr = true }) +vim.keymap.set("i", "", function() + return vim.fn["codeium#CycleCompletions"](-2) +end, { expr = true }) +vim.keymap.set("i", "", function() + return vim.fn["codeium#Clear"]() +end, { expr = true }) + +--toggle codeium on/off +function Toggle_codeium() + vim.g.codeium_enabled = not vim.g.codeium_enabled +end +vim.keymap.set("n", "c", ":lua Toggle_codeium()", { noremap = true, silent = true }) diff --git a/.config/nvim/lua/neovim/set.lua b/.config/nvim/lua/neovim/set.lua index 50dd380e..971ac615 100644 --- a/.config/nvim/lua/neovim/set.lua +++ b/.config/nvim/lua/neovim/set.lua @@ -79,7 +79,7 @@ vim.cmd([[set foldmethod=manual]]) -- vim.opt.textwidth = 80 -- vim.opt.wrap = true -- vim.opt.linebreak = true --- vim.cmd([[au BufRead,BufNewFile *.md setlocal textwidth=80]]) +vim.cmd([[au BufRead,BufNewFile *.md setlocal textwidth=80]]) -- max tab characters vim.cmd([[let g:mintabline_tab_max_chars=10]]) @@ -137,3 +137,6 @@ augroup remember_folds autocmd BufWinEnter *.* silent! loadview augroup END ]]) + +-- codeium disable default keybindings +vim.g.codeium_disable_bindings = 1 diff --git a/updates.txt b/updates.txt index a2632349..f6f261e6 100644 --- a/updates.txt +++ b/updates.txt @@ -402,3 +402,8 @@ makepkg -si 12/02/2023 Install huggingface-cli from AUR: paru huggingface-cli (1st choice, not -git) + +12/03/2023 +Config already set up for it, but install new packages and set up Codeium(code completion AI similar to Github Copilot) +You already have an api key set up, just log in using your details (see keepassxc) +https://github.com/Exafunction/codeium.vim#-installation-options