nvim: replace codium with ollama

This commit is contained in:
He4eT 2024-01-06 08:51:13 +01:00
commit eb4b1e78e3

View file

@ -128,31 +128,23 @@ require('lazy').setup({
build = ':TSUpdate', build = ':TSUpdate',
}, },
{ {
'Exafunction/codeium.vim', 'nomnivore/ollama.nvim',
keys = { { '<C-h>', mode = 'i' } }, dependencies = {
config = function() 'nvim-lua/plenary.nvim',
vim.g.codeium_manual = 1 },
vim.g.codeium_disable_bindings = 1 cmd = { 'Ollama', 'OllamaModel' },
vim.keymap.set('i', '<C-h>', function() keys = {
return vim.fn['codeium#Complete']() {
end, { expr = true }) '<leader>j',
vim.keymap.set('i', '<C-l>', function() ":<c-u>lua require('ollama').prompt()<cr>",
return vim.fn['codeium#Accept']() desc = 'ollama prompt',
end, { expr = true }) mode = { 'n', 'v' },
vim.keymap.set('i', '<C-u>', function() },
return vim.fn['codeium#Clear']() },
end, { expr = true }) opts = {
model = 'mistral',
vim.keymap.set('i', '<C-j>', function() url = 'http://ollama.internal:11434',
vim.fn['codeium#CycleCompletions'](1) },
print(vim.fn['codeium#GetStatusString']())
end, { expr = true })
vim.keymap.set('i', '<C-k>', function()
vim.fn['codeium#CycleCompletions'](-1)
print(vim.fn['codeium#GetStatusString']())
end, { expr = true })
end,
}, },
}, { }, {
-- Lazy options -- Lazy options