diff --git a/init.lua b/init.lua index d5a8fb3f..df86cb51 100644 --- a/init.lua +++ b/init.lua @@ -73,6 +73,8 @@ require('lazy').setup({ 'tpope/vim-fugitive', 'tpope/vim-rhubarb', + + 'ThePrimeagen/vim-be-good', -- Detect tabstop and shiftwidth automatically 'tpope/vim-sleuth', @@ -213,7 +215,6 @@ require('lazy').setup({ -- NOTE: Next Step on Your Neovim Journey: Add/Configure additional "plugins" for kickstart -- These are some example plugins that I've included in the kickstart repository. -- Uncomment any of the lines below to enable them. - require 'kickstart.plugins.autoformat', { import = 'custom.plugins' }, -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua` @@ -275,7 +276,7 @@ vim.keymap.set({ 'n', 'v' }, '', '', { silent = true }) vim.keymap.set('n', 'k', "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true }) vim.keymap.set('n', 'j', "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true }) -vim.keymap.set('n', '', 'Neotree', { desc = 'Toggle NeoTree' }) +vim.keymap.set('n', '', 'Neotree toggle', { desc = 'Toggle NeoTree' }) vim.keymap.set('n', 'F', 'Neotree filesystem reveal left', { desc = 'Show file in tree' }) -- [[ Highlight on yank ]] diff --git a/lazy-lock.json b/lazy-lock.json index d3039e27..4020fb01 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -8,6 +8,7 @@ "fidget.nvim": { "branch": "main", "commit": "7dc62b9ce32ac0f21cfb510f243644ce28a39299" }, "friendly-snippets": { "branch": "main", "commit": "53d3df271d031c405255e99410628c26a8f0d2b0" }, "gitsigns.nvim": { "branch": "main", "commit": "c5ff7628e19a47ec14d3657294cc074ecae27b99" }, + "harpoon": { "branch": "harpoon2", "commit": "2cd4e03372f7ee5692c8caa220f479ea07970f17" }, "indent-blankline.nvim": { "branch": "master", "commit": "7206c77cb931f79885fc47f88ae18f99148392eb" }, "lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "9453e3d6cd2ca45d96e20f343e8f1b927364b630" }, @@ -15,7 +16,6 @@ "neo-tree.nvim": { "branch": "v3.x", "commit": "230ff118613fa07138ba579b89d13ec2201530b9" }, "neodev.nvim": { "branch": "main", "commit": "c4ce017bd4bacf60bf59330cec9e93c5d5e104a6" }, "neoscroll.nvim": { "branch": "master", "commit": "be4ebf855a52f71ca4338694a5696675d807eff9" }, - "neovim": { "branch": "main", "commit": "2a4aad89a803c84d7d1555d136639cd48ade1d64" }, "nui.nvim": { "branch": "main", "commit": "c9b4de623d19a85b353ff70d2ae9c77143abe69c" }, "nvim-cmp": { "branch": "main", "commit": "0b751f6beef40fd47375eaf53d3057e0bfa317e4" }, "nvim-lspconfig": { "branch": "master", "commit": "511609ae0311abfcfaed3c398429a147e895ce2c" }, @@ -26,6 +26,7 @@ "telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" }, "telescope.nvim": { "branch": "0.1.x", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" }, "tokyonight.nvim": { "branch": "main", "commit": "f247ee700b569ed43f39320413a13ba9b0aef0db" }, + "vim-be-good": { "branch": "master", "commit": "c290810728a4f75e334b07dc0f3a4cdea908d351" }, "vim-fugitive": { "branch": "master", "commit": "46eaf8918b347906789df296143117774e827616" }, "vim-rhubarb": { "branch": "master", "commit": "ee69335de176d9325267b0fd2597a22901d927b1" }, "vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" }, diff --git a/lua/kickstart/plugins/autoformat.lua b/lua/custom/plugins/autoformatter.lua similarity index 97% rename from lua/kickstart/plugins/autoformat.lua rename to lua/custom/plugins/autoformatter.lua index bf491146..639a476c 100644 --- a/lua/kickstart/plugins/autoformat.lua +++ b/lua/custom/plugins/autoformatter.lua @@ -34,7 +34,7 @@ return { async = false, timeout_ms = 1000, } - vim.cmd('write') + vim.cmd 'write' end, { desc = 'Format file or range (in visual mode)' }) end, } diff --git a/lua/custom/plugins/harpoon.lua b/lua/custom/plugins/harpoon.lua new file mode 100644 index 00000000..c34f678a --- /dev/null +++ b/lua/custom/plugins/harpoon.lua @@ -0,0 +1,40 @@ +return { + 'ThePrimeagen/harpoon', + branch = 'harpoon2', + dependencies = { 'nvim-lua/plenary.nvim' }, + config = function() + local harpoon = require 'harpoon' + + -- REQUIRED + harpoon:setup() + -- REQUIRED + + vim.keymap.set('n', '', function() + harpoon:list():append() + end, { desc = "Add to harpoon"}) + 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/neoscroll.lua b/lua/custom/plugins/neoscroll.lua deleted file mode 100644 index 7194a8b8..00000000 --- a/lua/custom/plugins/neoscroll.lua +++ /dev/null @@ -1,7 +0,0 @@ -return { - "karb94/neoscroll.nvim", - config = function () - require('neoscroll').setup {} - end -} -