From 4e100409b1d0d813d3a144344a344d575af31634 Mon Sep 17 00:00:00 2001 From: Joshua Nussbaum <67082011+joshuanussbaum@users.noreply.github.com> Date: Wed, 29 Jan 2025 13:29:10 -0600 Subject: [PATCH] add new plugs --- init.lua | 2 +- lua/custom/plugins/copilot-cmp.lua | 4 ++ lua/custom/plugins/init.lua | 1 + lua/custom/plugins/ollama-chat-nvim.lua | 78 +++++++++++++++++++++++++ lua/custom/plugins/undotree.lua | 7 +++ 5 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 lua/custom/plugins/ollama-chat-nvim.lua create mode 100644 lua/custom/plugins/undotree.lua diff --git a/init.lua b/init.lua index c0e5a5de..dddafdb5 100644 --- a/init.lua +++ b/init.lua @@ -870,7 +870,7 @@ require('lazy').setup({ -- This is the easiest way to modularize your config. -- -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. - -- { import = 'custom.plugins' }, + { import = 'custom.plugins' }, -- -- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec` -- Or use telescope! diff --git a/lua/custom/plugins/copilot-cmp.lua b/lua/custom/plugins/copilot-cmp.lua index d59202a7..6b549a09 100644 --- a/lua/custom/plugins/copilot-cmp.lua +++ b/lua/custom/plugins/copilot-cmp.lua @@ -14,3 +14,7 @@ else }, } end + +return { + 'https://github.com/mbbill/undotree', +} diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index a6e0ef4c..5cdd065c 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -18,4 +18,5 @@ return {} -- https://github.com/vipul-sharma20/nvim-jira -- https://github.com/walterl/centerfold -- https://github.com/tricktux/pomodoro.vim/tree/master - but fork it into your own in lua +-- https://github.com/mbbill/undotree --]] diff --git a/lua/custom/plugins/ollama-chat-nvim.lua b/lua/custom/plugins/ollama-chat-nvim.lua new file mode 100644 index 00000000..040fea6e --- /dev/null +++ b/lua/custom/plugins/ollama-chat-nvim.lua @@ -0,0 +1,78 @@ +if true then + return {} +else + return { + 'gerazov/ollama-chat.nvim', + dependencies = { + 'nvim-lua/plenary.nvim', + 'stevearc/dressing.nvim', + 'nvim-telescope/telescope.nvim', + }, + -- lazy load on command + cmd = { + 'OllamaQuickChat', + 'OllamaCreateNewChat', + 'OllamaContinueChat', + 'OllamaChat', + 'OllamaChatCode', + 'OllamaModel', + 'OllamaServe', + 'OllamaServeStop', + }, + + keys = { + { + 'ocq', + 'OllamaQuickChat', + desc = 'Ollama Quick Chat', + mode = { 'n', 'x' }, + silent = true, + }, + { + 'ocn', + 'OllamaCreateNewChat', + desc = 'Create Ollama Chat', + mode = { 'n', 'x' }, + silent = true, + }, + { + 'occ', + 'OllamaContinueChat', + desc = 'Continue Ollama Chat', + mode = { 'n', 'x' }, + silent = true, + }, + { + 'och', + 'OllamaChat', + desc = 'Chat', + mode = { 'n' }, + silent = true, + }, + { + 'ocd', + 'OllamaChatCode', + desc = 'Chat Code', + mode = { 'n' }, + silent = true, + }, + }, + + opts = { + chats_folder = vim.fn.stdpath 'data', -- data folder is ~/.local/share/nvim + -- you can also choose "current" and "tmp" + quick_chat_file = 'ollama-chat.md', + animate_spinner = true, -- set this to false to disable spinner animation + model = 'openhermes2-mistral', + model_code = 'codellama', + url = 'http://127.0.0.1:11434', + serve = { + on_start = false, + command = 'ollama', + args = { 'serve' }, + stop_command = 'pkill', + stop_args = { '-SIGTERM', 'ollama' }, + }, + }, + } +end diff --git a/lua/custom/plugins/undotree.lua b/lua/custom/plugins/undotree.lua new file mode 100644 index 00000000..3c698118 --- /dev/null +++ b/lua/custom/plugins/undotree.lua @@ -0,0 +1,7 @@ +if true then + return {} +else + return { + 'https://github.com/mbbill/undotree', + } +end