From d581be532d0182731f11683c8a0bd6b794e0470a Mon Sep 17 00:00:00 2001 From: m3tam3re Date: Tue, 4 Jun 2024 12:41:36 +0200 Subject: [PATCH] ollama settings --- nvim/init.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/nvim/init.lua b/nvim/init.lua index 13fa096..fc1e8c4 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -850,6 +850,20 @@ require('lazy').setup({ -- list_models = '', -- Retrieves a list of model names debug = false, -- Prints errors and the command which is run. }, + config = function() + require('gen').prompts['Fix_Code'] = { + prompt = 'Fix the following code. Only ouput the result in format ```$filetype\n...\n```:\n```$filetype\n$text\n```', + replace = true, + extract = '```$filetype\n(.-)```', + model = 'codellama:latest', + } + require('gen').prompts['Enhance_Code'] = { + prompt = 'Fix the following code. Only ouput the result in format ```$filetype\n...\n```:\n```$filetype\n$text\n```', + replace = true, + extract = '```$filetype\n(.-)```', + model = 'codellama:latest', + } + end, vim.keymap.set('n', 'lo', vim.cmd.Gen, { desc = '[O]llama AI' }), }, {