From ea5c72636cd013ee862014146042a60a3f1ccf4f Mon Sep 17 00:00:00 2001 From: Simo Soini Date: Thu, 5 Jun 2025 12:24:28 +0300 Subject: [PATCH] Modularize the config for easier merges from kickstart.nvim --- init.lua | 53 +---------------------------------- lua/custom/plugins/init.lua | 55 ++++++++++++++++++++++++++++++++++++- 2 files changed, 55 insertions(+), 53 deletions(-) diff --git a/init.lua b/init.lua index 3ed1432f..083d96fd 100644 --- a/init.lua +++ b/init.lua @@ -252,18 +252,6 @@ require('lazy').setup({ -- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link). 'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically - -- Navigation integration for tmux - -- 'christoomey/vim-tmux-navigator', - - -- Undotree for saving file editing history - 'mbbill/undotree', - - -- Automatic pairs for parentheses etc. - -- 'jiangmiao/auto-pairs', - - -- Github copilot - -- 'github/copilot.vim', - -- Git related plugins 'tpope/vim-fugitive', 'tpope/vim-rhubarb', @@ -271,45 +259,6 @@ require('lazy').setup({ -- Detect tabstop and shiftwidth automatically 'tpope/vim-sleuth', - -- Harpoon for fast navigation within a project - { - 'theprimeagen/harpoon', - config = function() - local mark = require 'harpoon.mark' - local ui = require 'harpoon.ui' - - vim.keymap.set('n', '', mark.add_file) - vim.keymap.set('n', '', ui.toggle_quick_menu) - - vim.keymap.set('n', '', function() - ui.nav_file(1) - end) - vim.keymap.set('n', '', function() - ui.nav_file(2) - end) - vim.keymap.set('n', '', function() - ui.nav_file(3) - end) - end, - }, - - -- Oil.nvim for directory manipulation - { - 'stevearc/oil.nvim', - ---@module 'oil' - ---@type oil.SetupOpts - opts = {}, - -- Optional dependencies - dependencies = { { 'echasnovski/mini.icons', opts = {} } }, - -- dependencies = { "nvim-tree/nvim-web-devicons" }, -- use if you prefer nvim-web-devicons - -- Lazy loading is not recommended because it is very tricky to make it work correctly in all situations. - lazy = false, - config = function() - require('oil').setup() - vim.keymap.set('n', '-', 'Oil', { desc = 'Open parent directory' }) - end, - }, - -- NOTE: Plugins can also be added by using a table, -- with the first argument being the link and the following -- keys can be used to configure plugin behavior/loading/etc. @@ -1052,7 +1001,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/init.lua b/lua/custom/plugins/init.lua index be0eb9d8..0696ffa5 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -2,4 +2,57 @@ -- I promise not to create any merge conflicts in this directory :) -- -- See the kickstart.nvim README for more information -return {} +return { + -- Undotree for saving file editing history + 'mbbill/undotree', + + -- TS Autotag for html auto tag close + 'windwp/nvim-ts-autotag', + + -- Harpoon for fast navigation within a project + { + 'theprimeagen/harpoon', + config = function() + local mark = require 'harpoon.mark' + local ui = require 'harpoon.ui' + + vim.keymap.set('n', '', mark.add_file) + vim.keymap.set('n', '', ui.toggle_quick_menu) + + vim.keymap.set('n', '', function() + ui.nav_file(1) + end) + vim.keymap.set('n', '', function() + ui.nav_file(2) + end) + vim.keymap.set('n', '', function() + ui.nav_file(3) + end) + end, + }, + + -- Oil.nvim for directory manipulation + { + 'stevearc/oil.nvim', + ---@module 'oil' + ---@type oil.SetupOpts + opts = {}, + -- Optional dependencies + dependencies = { { 'echasnovski/mini.icons', opts = {} } }, + -- dependencies = { "nvim-tree/nvim-web-devicons" }, -- use if you prefer nvim-web-devicons + -- Lazy loading is not recommended because it is very tricky to make it work correctly in all situations. + lazy = false, + config = function() + require('oil').setup() + vim.keymap.set('n', '-', 'Oil', { desc = 'Open parent directory' }) + end, + }, + + -- INFO: Previously used, now disabled plugins + + -- Navigation integration for tmux + -- 'christoomey/vim-tmux-navigator', + + -- Github copilot + -- 'github/copilot.vim', +}