1
0

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

This commit is contained in:
Nigel Barink 2024-04-04 22:39:20 +02:00
parent e4ca8c6039
commit 9843cf6e0c
Signed by: Nigel
GPG Key ID: C54278C495538619
3 changed files with 19 additions and 0 deletions

View File

@ -5,6 +5,7 @@
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"fidget.nvim": { "branch": "main", "commit": "933db4596e4bab1b09b6d48a10e21819e4cc458f" },
"gen.nvim": { "branch": "main", "commit": "87fbe811155b90eea58622614809705b966009ad" },
"hardtime.nvim": { "branch": "main", "commit": "21b0f9146198bb43fbc9f5ec66c8af3234f278ed" },
"harpoon": { "branch": "harpoon2", "commit": "a38be6e0dd4c6db66997deab71fc4453ace97f9c" },
"lazy.nvim": { "branch": "main", "commit": "3132d7d27d56d6bb4bdd0a09623d162b3cf1c588" },

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,
},
}
}