From d44a4cd533190f3c1467f2973526a92843b8bf3d Mon Sep 17 00:00:00 2001 From: Tyler Hallada Date: Fri, 1 Dec 2023 15:26:01 -0500 Subject: [PATCH] Install neoai-nvim --- lua/install-plugins.lua | 8 ++++++++ lua/plugins/neoai-nvim.lua | 12 ++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 lua/plugins/neoai-nvim.lua diff --git a/lua/install-plugins.lua b/lua/install-plugins.lua index c88e18d..5c8bdfb 100644 --- a/lua/install-plugins.lua +++ b/lua/install-plugins.lua @@ -347,6 +347,14 @@ return require('packer').startup(function(use) end } -- use 'github/copilot.vim' + use { "MunifTanjim/nui.nvim" } + use { + "Bryley/neoai.nvim", + require = { "MunifTanjim/nui.nvim" }, + config = function() + require('plugins.neoai-nvim') + end + } use 'ziglang/zig.vim' use { 'akinsho/bufferline.nvim', diff --git a/lua/plugins/neoai-nvim.lua b/lua/plugins/neoai-nvim.lua new file mode 100644 index 0000000..42167f7 --- /dev/null +++ b/lua/plugins/neoai-nvim.lua @@ -0,0 +1,12 @@ +require('neoai').setup() + +vim.keymap.set('n', 'ai', 'NeoAI', + { silent = true, noremap = true, desc = "Toggle Neo[AI]" } +) +vim.keymap.set('n', 'ac', 'NeoAIContext', + { silent = true, noremap = true, desc = "Toggle Neo[A]i with [C]ontext of current buffer" } +) +-- Can't get this to work :/ +-- vim.keymap.set('x', 'ai', [['<,'>NeoAIContext]], +-- { silent = true, noremap = true, desc = "Toggle Neo[AI] with context of selected text" } +-- )