Added AI, cleaned up some things
This commit is contained in:
		| @ -13,12 +13,10 @@ end | ||||
| vim.opt.rtp:prepend(lazypath) | ||||
| require("barink.keys") | ||||
| require("lazy").setup("barink.plugins" , { | ||||
|     root = vim.fn.stdpath("data") .. "/lazy", -- directory where plugins will be installed | ||||
|     -- leave nil when passing the spec as the first argument to setup() | ||||
|     root = vim.fn.stdpath("data") .. "/lazy",  | ||||
|     change_detection = { | ||||
|       -- automatically check for config file changes and reload the ui | ||||
|       enabled = false, | ||||
|       notify = true, -- get a notification when changes are found | ||||
|       notify = true,  | ||||
|     }, | ||||
|  | ||||
| }) | ||||
|  | ||||
							
								
								
									
										55
									
								
								lua/barink/plugins/AI.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										55
									
								
								lua/barink/plugins/AI.lua
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,55 @@ | ||||
| return { | ||||
|     "github/copilot.vim", | ||||
|     { | ||||
|         "nomnivore/ollama.nvim", | ||||
|         dependencies = { | ||||
|             "nvim-lua/plenary.nvim", | ||||
|         }, | ||||
|         cmd = { "Ollama", "OllamaModel", "OllamaServe", "OllamaServeStop" }, | ||||
|         keys = { | ||||
|             { | ||||
|                 "<leader>oo", | ||||
|                 ":<c-u>lua require('ollama').prompt()<cr>", | ||||
|                 desc = "ollama prompt", | ||||
|                 mode = { "n", "v" }, | ||||
|             }, | ||||
|             { | ||||
|                 "<leader>oG", | ||||
|                 ":<c-u>lua require('ollama').prompt('Generate_Code')<cr>", | ||||
|                 desc = "ollama Generate Code", | ||||
|                 mode = { "n", "v" }, | ||||
|             }, | ||||
|         }, | ||||
|  | ||||
|         opts = { | ||||
|             model = "qwen2.5-coder" | ||||
|         }, | ||||
|     }, | ||||
|     { | ||||
|         "yetone/avante.nvim", | ||||
|         event = "VeryLazy", | ||||
|         version = false, -- Never set this value to "*"! Never! | ||||
|         opts = { | ||||
|             system_prompt = function() | ||||
|                 local hub = require("mcphub").get_hub_instance() | ||||
|                 return hub:get_active_servers_prompt() | ||||
|             end, | ||||
|             custom_tools = function() | ||||
|                 return { | ||||
|                     require("mcphub.extensions.avante").mcp_tool(), | ||||
|                 } | ||||
|             end, | ||||
|             provider = "ollama", | ||||
|             ollama = { | ||||
|                 model = "qwen2.5-coder" | ||||
|             } | ||||
|         }, | ||||
|         dependencies = { | ||||
|             "nvim-treesitter/nvim-treesitter", | ||||
|             "stevearc/dressing.nvim", | ||||
|             "nvim-lua/plenary.nvim", | ||||
|             "MunifTanjim/nui.nvim", | ||||
|         } | ||||
|     } | ||||
|  | ||||
| } | ||||
| @ -8,6 +8,7 @@ return { | ||||
|             'nvim-tree/nvim-web-devicons' | ||||
|         }, | ||||
|         config = function() | ||||
|             require("oil").setup() | ||||
|             vim.keymap.set("n", "-", "<CMD>Oil<CR>", { desc = "Open parent directory" }) | ||||
|         end | ||||
|     } | ||||
|  | ||||
| @ -1,35 +1,25 @@ | ||||
| return { | ||||
|     "ThePrimeagen/harpoon", | ||||
|     branch= "harpoon2", | ||||
|     dependencies = { | ||||
|         {"nvim-lua/plenary.nvim"}, | ||||
|         {"nvim-telescope/telescope.nvim"} | ||||
|     }, | ||||
|     config = function() | ||||
|         local harpoon = require("harpoon") | ||||
|         harpoon.setup() | ||||
|   "ThePrimeagen/harpoon", | ||||
|   branch = "harpoon2", | ||||
|   dependencies = { | ||||
|     { "nvim-lua/plenary.nvim" }, | ||||
|     { "nvim-telescope/telescope.nvim" } | ||||
|   }, | ||||
|   config = function() | ||||
|     local harpoon = require("harpoon") | ||||
|     harpoon.setup() | ||||
|  | ||||
|         vim.keymap.set("n", "ha", function() harpoon:list():add() end) | ||||
|         vim.keymap.set("n", "hh", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end) | ||||
|  | ||||
|             require("telescope.pickers").new({}, { | ||||
|                 result = file_paths, | ||||
|                 previewer = conf.file_previewer({}), | ||||
|                 sorter = conf.generic_sorter({}), | ||||
|             }):find() | ||||
|         end | ||||
|  | ||||
|         vim.keymap.set("n", "<leader>ha", function() harpoon:list():add() end) | ||||
|         vim.keymap.set("n", "<leader>hh", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end) | ||||
|         vim.keymap.set("n", "<leader>fe", function () toggle_telescope(harpoon:list()) end, { desc = "Open harpoon window"} ) | ||||
|         vim.keymap.set("n", "C-1", function() harpoon:list():select(1) end) | ||||
|         vim.keymap.set("n", "C-2", function() harpoon:list():select(2) end) | ||||
|         vim.keymap.set("n", "C-3", function() harpoon:list():select(3) end) | ||||
|         vim.keymap.set("n", "C-4", function() harpoon:list():select(4) end) | ||||
|     vim.keymap.set("n", "<leader>ha", function() harpoon:list():add() end) | ||||
|     vim.keymap.set("n", "<leader>hh", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end) | ||||
|     vim.keymap.set("n", "<leader>fe", function() toggle_telescope(harpoon:list()) end, | ||||
|       { desc = "Open harpoon window" }) | ||||
|     vim.keymap.set("n", "C-1", function() harpoon:list():select(1) end) | ||||
|     vim.keymap.set("n", "C-2", function() harpoon:list():select(2) end) | ||||
|     vim.keymap.set("n", "C-3", function() harpoon:list():select(3) end) | ||||
|     vim.keymap.set("n", "C-4", function() harpoon:list():select(4) end) | ||||
|  | ||||
|  | ||||
|         vim.keymap.set("n", "<C-,>", function() harpoon:list():prev() end) | ||||
|         vim.keymap.set("n", "<C-.>", function() harpoon:list():next() end) | ||||
|  | ||||
|     end | ||||
|     vim.keymap.set("n", "<C-,>", function() harpoon:list():prev() end) | ||||
|     vim.keymap.set("n", "<C-.>", function() harpoon:list():next() end) | ||||
|   end | ||||
| } | ||||
|  | ||||
							
								
								
									
										16
									
								
								lua/barink/plugins/neovim-context.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								lua/barink/plugins/neovim-context.lua
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,16 @@ | ||||
| return { | ||||
|     { | ||||
|         "nvim-treesitter/nvim-treesitter-context", | ||||
|         dependencies = { | ||||
|         }, | ||||
|         config = function() | ||||
|             require('treesitter-context').setup({ | ||||
|                 enable = true, | ||||
|                 max_lines = 4, | ||||
|                 min_window_height = 0, | ||||
|                 line_numbers = true, | ||||
|                 mode = 'cursor', | ||||
|             }) | ||||
|         end | ||||
|     } | ||||
| } | ||||
							
								
								
									
										8
									
								
								lua/barink/plugins/typescriptTools.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								lua/barink/plugins/typescriptTools.lua
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,8 @@ | ||||
| return { | ||||
|     "pmizio/typescript-tools.nvim", | ||||
|     dependencies = { | ||||
|         "nvim-lua/plenary.nvim", | ||||
|         "neovim/nvim-lspconfig", | ||||
|     }, | ||||
|     opts = {} | ||||
| } | ||||
							
								
								
									
										13
									
								
								lua/barink/plugins/wezterm.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								lua/barink/plugins/wezterm.lua
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,13 @@ | ||||
| return { | ||||
|     'craigmac/nvim-navigator', | ||||
|     config = function() | ||||
|         require('Navigator').setup() | ||||
|  | ||||
|         vim.keymap.set({ 'n', 't' }, '<A-h>', '<CMD>NavigatorLeft<CR>') | ||||
|         vim.keymap.set({ 'n', 't' }, '<A-l>', '<CMD>NavigatorRight<CR>') | ||||
|         vim.keymap.set({ 'n', 't' }, '<A-k>', '<CMD>NavigatorUp<CR>') | ||||
|         vim.keymap.set({ 'n', 't' }, '<A-j>', '<CMD>NavigatorDown<CR>') | ||||
|         vim.keymap.set({ 'n', 't' }, '<A-p>', '<CMD>NavigatorPrevious<CR>') | ||||
|     end | ||||
|  | ||||
| } | ||||
| @ -35,13 +35,3 @@ vim.api.nvim_create_autocmd('LspAttach', { | ||||
| vim.g.netrw_browse_split = 0 | ||||
| vim.g.netrw_winsize = 25 | ||||
|  | ||||
|  | ||||
| --[[ | ||||
| -- Run zig test on save | ||||
| -- TODO: fix vim.cmd call | ||||
| -- TODO: only do this when a zig test file is open | ||||
| vim.api.nvim_create_autocmd('BufWritePost' , { | ||||
|     callback = function () | ||||
|         vim.cmd{cmd = '!zig' , args= {'test', vim.fn.expand('%')} } | ||||
|     end | ||||
| })]] -- | ||||
|  | ||||
		Reference in New Issue
	
	Block a user