From 6a1a1589a2708449755d5039c2279e9b5197b686 Mon Sep 17 00:00:00 2001 From: andy Date: Sat, 29 Mar 2025 21:02:26 -0700 Subject: [PATCH] update harpoon --- init.lua | 3 ++ lua/custom/plugins/harpoon.lua | 70 +++++++++++++++--------------- lua/custom/plugins/lazygit.lua | 21 +++++++++ lua/custom/plugins/vim-be-good.lua | 3 ++ 4 files changed, 62 insertions(+), 35 deletions(-) create mode 100644 lua/custom/plugins/lazygit.lua create mode 100644 lua/custom/plugins/vim-be-good.lua diff --git a/init.lua b/init.lua index 9fed560e..d61be613 100644 --- a/init.lua +++ b/init.lua @@ -118,6 +118,8 @@ vim.keymap.set('n', '', '', { desc = 'Move focus to the right win vim.keymap.set('n', '', '', { desc = 'Move focus to the lower window' }) vim.keymap.set('n', '', '', { desc = 'Move focus to the upper window' }) +vim.keymap.set('n', '', 'zz') +vim.keymap.set('n', '', 'zz') -- [[ Basic Autocommands ]] -- See `:help lua-guide-autocommands` @@ -344,6 +346,7 @@ require('lazy').setup({ -- See `:help telescope.builtin` local builtin = require 'telescope.builtin' + vim.keymap.set('n', '', builtin.find_files) vim.keymap.set('n', 'sh', builtin.help_tags, { desc = '[S]earch [H]elp' }) vim.keymap.set('n', 'sk', builtin.keymaps, { desc = '[S]earch [K]eymaps' }) vim.keymap.set('n', 'sf', builtin.find_files, { desc = '[S]earch [F]iles' }) diff --git a/lua/custom/plugins/harpoon.lua b/lua/custom/plugins/harpoon.lua index 1491c2d2..be9bea3c 100644 --- a/lua/custom/plugins/harpoon.lua +++ b/lua/custom/plugins/harpoon.lua @@ -1,37 +1,37 @@ return { - -- 'ThePrimeagen/harpoon', - -- branch = 'harpoon2', - -- dependencies = { 'nvim-lua/plenary.nvim' }, - -- init = function() - -- local harpoon = require 'harpoon' - -- - -- harpoon:setup() - -- vim.keymap.set('n', 'a', function() - -- harpoon:list():add() - -- end) - -- vim.keymap.set('n', '', function() - -- harpoon.ui:toggle_quick_menu(harpoon:list()) - -- end) - -- - -- vim.keymap.set('n', '', function() - -- harpoon:list():select(1) - -- end) - -- vim.keymap.set('n', '', function() - -- harpoon:list():select(2) - -- end) - -- vim.keymap.set('n', '', function() - -- harpoon:list():select(3) - -- end) - -- vim.keymap.set('n', '', function() - -- harpoon:list():select(4) - -- end) - -- - -- -- Toggle previous & next buffers stored within Harpoon list - -- vim.keymap.set('n', '', function() - -- harpoon:list():prev() - -- end) - -- vim.keymap.set('n', '', function() - -- harpoon:list():next() - -- end) - -- end, + 'ThePrimeagen/harpoon', + branch = 'harpoon2', + dependencies = { 'nvim-lua/plenary.nvim' }, + init = function() + local harpoon = require 'harpoon' + + harpoon:setup() + vim.keymap.set('n', 'a', function() + harpoon:list():add() + end) + vim.keymap.set('n', '', function() + harpoon.ui:toggle_quick_menu(harpoon:list()) + end) + + vim.keymap.set('n', '', function() + harpoon:list():select(1) + end) + vim.keymap.set('n', '', function() + harpoon:list():select(2) + end) + vim.keymap.set('n', '', function() + harpoon:list():select(3) + end) + vim.keymap.set('n', '', function() + harpoon:list():select(4) + end) + + -- Toggle previous & next buffers stored within Harpoon list + vim.keymap.set('n', '', function() + harpoon:list():prev() + end) + vim.keymap.set('n', '', function() + harpoon:list():next() + end) + end, } diff --git a/lua/custom/plugins/lazygit.lua b/lua/custom/plugins/lazygit.lua new file mode 100644 index 00000000..fe42cd23 --- /dev/null +++ b/lua/custom/plugins/lazygit.lua @@ -0,0 +1,21 @@ +-- nvim v0.8.0 +return { + 'kdheepak/lazygit.nvim', + lazy = true, + cmd = { + 'LazyGit', + 'LazyGitConfig', + 'LazyGitCurrentFile', + 'LazyGitFilter', + 'LazyGitFilterCurrentFile', + }, + -- optional for floating window border decoration + dependencies = { + 'nvim-lua/plenary.nvim', + }, + -- setting the keybinding for LazyGit with 'keys' is recommended in + -- order to load the plugin when the command is run for the first time + keys = { + { 'lg', 'LazyGit', desc = 'LazyGit' }, + }, +} diff --git a/lua/custom/plugins/vim-be-good.lua b/lua/custom/plugins/vim-be-good.lua new file mode 100644 index 00000000..b1e2a543 --- /dev/null +++ b/lua/custom/plugins/vim-be-good.lua @@ -0,0 +1,3 @@ +return { + 'ThePrimeagen/vim-be-good', +}