🔧 Configured neovim to use codeium
This commit is contained in:
parent
53122d80f0
commit
57883c2e14
4 changed files with 32 additions and 6 deletions
|
|
@ -93,4 +93,6 @@ return require("packer").startup(function(use)
|
|||
},
|
||||
},
|
||||
})
|
||||
-- codeium AI
|
||||
use("Exafunction/codeium.vim")
|
||||
end)
|
||||
|
|
|
|||
|
|
@ -33,12 +33,8 @@ vim.keymap.set("n", "<leader>x", "<cmd>!chmod +x %<CR>", { silent = true })
|
|||
-- Vimium Like Keybindings
|
||||
vim.keymap.set("n", "<S-t>", "<c-w>:tabnew<CR>", {})
|
||||
|
||||
vim.keymap.set("n", "<S-tab>", "<c-w>:tabprevious<CR>", {})
|
||||
vim.keymap.set("n", "<A-j>", "<c-w>:tabprevious<CR>", {})
|
||||
-- tab keybindings
|
||||
vim.keymap.set("n", "<A-left>", "<c-w>:tabprevious<CR>", {})
|
||||
|
||||
vim.keymap.set("n", "<A-tab>", "<c-w>:tabnext<CR>", {})
|
||||
vim.keymap.set("n", "<A-k>", "<c-w>:tabnext<CR>", {})
|
||||
vim.keymap.set("n", "<A-right>", "<c-w>:tabnext<CR>", {})
|
||||
-- Use ctrl- [hl] to select the active split!
|
||||
vim.keymap.set("n", "<C-h>", "<c-w>:wincmd h<CR>", {})
|
||||
|
|
@ -137,3 +133,23 @@ vim.keymap.set("n", "<leader>dso", ":lua require'dap'.step_out()")
|
|||
vim.keymap.set("n", "<leader>dsi", ":lua require'dap'.step_into()")
|
||||
vim.keymap.set("n", "<leader>dcl", ":lua require'dap'.close()")
|
||||
-- vim.keymap.set("n", "<leader>dui", ":lua require('dapui').toggle()")
|
||||
--
|
||||
-- codeium remappings
|
||||
vim.keymap.set("i", "<A-tab>", function()
|
||||
return vim.fn["codeium#Accept"]()
|
||||
end, { expr = true })
|
||||
vim.keymap.set("i", "<C-right>", function()
|
||||
return vim.fn["codeium#CycleCompletions"](1)
|
||||
end, { expr = true })
|
||||
vim.keymap.set("i", "<C-left>", function()
|
||||
return vim.fn["codeium#CycleCompletions"](-2)
|
||||
end, { expr = true })
|
||||
vim.keymap.set("i", "<C-x>", 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", "<leader>c", ":lua Toggle_codeium()<cr>", { noremap = true, silent = true })
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue