FEAT: Adding Codellama as a nvim plugin using gen.nvim
This commit is contained in:
@ -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>")
|
||||
|
17
lua/barink/plugins/codellama.lua
Normal file
17
lua/barink/plugins/codellama.lua
Normal 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,
|
||||
},
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user