1
0

FEAT: Adding Codellama as a nvim plugin using gen.nvim

This commit is contained in:
2024-04-04 22:39:20 +02:00
parent e4ca8c6039
commit 9843cf6e0c
3 changed files with 19 additions and 0 deletions

View File

@ -39,3 +39,4 @@ vim.keymap.set('n', '<F5>', function () print("Start debug session" ) require('d
vim.keymap.set('n', '<F6>', function () require('dap').step_over() end )
vim.keymap.set('n', '<F7>', function () require('dap').step_into() end )
vim.keymap.set('n', '<leader>=',":Gen Generate<CR>")

View File

@ -0,0 +1,17 @@
return {
{
'David-kunz/gen.nvim',
opts = {
model = "codellama:7b",
host = "localhost",
port = "11434",
quit_mape = "q",
init = function (options) pcall(io.popen("ollama serve > /dev/null 2>&1 &)")) end,
display_mode = "split",
command =function (options)
local body = {model = options.model, stream=true}
return "curl --silent --no-buffer -X POST http://" .. options.host .. ':' .. options.port .. "/api/chat -d $body"
end,
},
}
}