diff --git a/lua/core/keymaps.lua b/lua/core/keymaps.lua index 0882b2a..4c182e8 100644 --- a/lua/core/keymaps.lua +++ b/lua/core/keymaps.lua @@ -29,10 +29,10 @@ vim.keymap.set('n', 'n', 'nzzzv', opts) vim.keymap.set('n', 'N', 'Nzzzv', opts) -- Resize with arrows -vim.keymap.set('n', '', ':resize -2', opts) -vim.keymap.set('n', '', ':resize +2', opts) -vim.keymap.set('n', '', ':vertical resize -2', opts) -vim.keymap.set('n', '', ':vertical resize +2', opts) +vim.keymap.set('n', '', ':resize -2', opts) +vim.keymap.set('n', '', ':resize +2', opts) +vim.keymap.set('n', '', ':vertical resize -2', opts) +vim.keymap.set('n', '', ':vertical resize +2', opts) -- Buffers vim.keymap.set('n', '', ':bnext', opts) diff --git a/lua/plugins/autocompletion.lua b/lua/plugins/autocompletion.lua index af63e81..af09f2e 100644 --- a/lua/plugins/autocompletion.lua +++ b/lua/plugins/autocompletion.lua @@ -96,7 +96,7 @@ return { -- Autocompletion -- If you prefer more traditional completion keymaps, -- you can uncomment the following lines - --[''] = cmp.mapping.confirm { select = true }, + [''] = cmp.mapping.confirm { select = true }, --[''] = cmp.mapping.select_next_item(), --[''] = cmp.mapping.select_prev_item(), diff --git a/lua/plugins/codecompanion.lua b/lua/plugins/codecompanion.lua index 47f8e05..8164ccd 100644 --- a/lua/plugins/codecompanion.lua +++ b/lua/plugins/codecompanion.lua @@ -5,6 +5,22 @@ return { 'nvim-treesitter/nvim-treesitter', }, config = { + prompt_library = { + ['prompt2prompt'] = { + strategy = 'chat', + description = 'a prompt to get the LLM to help you create a prompt', + prompts = { + { + role = 'system', + content = 'You are a prompt engineer that knows exactly how to prompt LLMs for them to be most effective and helpful', + }, + { + role = 'user', + content = ' I would like you to help me craft the best possible to achieve my goal. The prompt will be used by you, the LLM. You will follow the following process: 1. Your first response will be to ask me what the prompt should be about. I will provide my answer, but we will need to improve it through continual iterations by going through the next steps. 2. Based on my input, you will generate 2 sections, a) Revised prompt (provide your rewritten prompt, it should be clear, concise, and easily understood by you), b) Questions (ask any relevant questions pertaining to what additional information is needed from me to improve the prompt). 3. We will continue this iterative process with me providing additional information to you and you updating the prompt in the Revised prompt section until I say we are done.', + }, + }, + }, + }, adapters = { llama3 = function() return require('codecompanion.adapters').extend('ollama', {