From 40700b5f5fc52d708e75c5b6e965e6e2b81df9a9 Mon Sep 17 00:00:00 2001 From: Tim Redband Date: Mon, 8 Apr 2024 13:49:38 -0400 Subject: [PATCH] simplify loading plugins --- init.lua | 2 +- lua/kickstart/{plugins => archived}/debug.lua | 0 lua/kickstart/{plugins => archived}/lint.lua | 1 - lua/kickstart/plugins/init.lua | 50 ------------------- lua/kickstart/plugins/vim-sleuth.lua | 2 +- 5 files changed, 2 insertions(+), 53 deletions(-) rename lua/kickstart/{plugins => archived}/debug.lua (100%) rename lua/kickstart/{plugins => archived}/lint.lua (99%) delete mode 100644 lua/kickstart/plugins/init.lua diff --git a/init.lua b/init.lua index 36f6f8bd..0eff095b 100644 --- a/init.lua +++ b/init.lua @@ -20,7 +20,7 @@ vim.opt.rtp:prepend(lazypath) -- To update plugins, you can run -- :Lazy update require('lazy').setup({ - require 'kickstart.plugins', + { import = 'kickstart.plugins' }, { import = 'custom.plugins' }, }, { ui = { diff --git a/lua/kickstart/plugins/debug.lua b/lua/kickstart/archived/debug.lua similarity index 100% rename from lua/kickstart/plugins/debug.lua rename to lua/kickstart/archived/debug.lua diff --git a/lua/kickstart/plugins/lint.lua b/lua/kickstart/archived/lint.lua similarity index 99% rename from lua/kickstart/plugins/lint.lua rename to lua/kickstart/archived/lint.lua index 7f0dc42f..c3b77827 100644 --- a/lua/kickstart/plugins/lint.lua +++ b/lua/kickstart/archived/lint.lua @@ -1,5 +1,4 @@ return { - { -- Linting 'mfussenegger/nvim-lint', event = { 'BufReadPre', 'BufNewFile' }, diff --git a/lua/kickstart/plugins/init.lua b/lua/kickstart/plugins/init.lua deleted file mode 100644 index 4c185c9b..00000000 --- a/lua/kickstart/plugins/init.lua +++ /dev/null @@ -1,50 +0,0 @@ -return { - -- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link). - require 'kickstart.plugins.vim-sleuth', - -- 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. - -- - -- Use `opts = {}` to force a plugin to be loaded. - -- - -- This is equivalent to: - -- require('Comment').setup({}) - -- "gc" to comment visual regions/lines - require 'kickstart.plugins.comments', - -- Here is a more advanced example where we pass configuration - -- options to `gitsigns.nvim`. This is equivalent to the following lua: - -- require('gitsigns').setup({ ... }) - -- - -- See `:help gitsigns` to understand what the configuration keys do - require 'kickstart.plugins.gitsigns', - -- NOTE: Plugins can also be configured to run lua code when they are loaded. - -- This is often very useful to both group configuration, as well as handle - -- lazy loading plugins that don't need to be loaded immediately at startup. - -- - -- For example, in the following configuration, we use: - -- event = 'VimEnter' - -- - -- which loads which-key before all the UI elements are loaded. Events can be - -- normal autocommands events (`:help autocmd-events`). - -- - -- Then, because we use the `config` key, the configuration only runs - -- after the plugin has been loaded: - -- config = function() ... end - require 'kickstart.plugins.which-key', - -- NOTE: Plugins can specify dependencies. - -- - -- The dependencies are proper plugin specifications as well - anything - -- you do for a plugin at the top level, you can do for a dependency. - -- - -- Use the `dependencies` key to specify the dependencies of a particular plugin - require 'kickstart.plugins.telescope', - require 'kickstart.plugins.lspconfig', - require 'kickstart.plugins.conform', - require 'kickstart.plugins.nvim-cmp', - require 'kickstart.plugins.colorscheme', - require 'kickstart.plugins.todo-comments', - require 'kickstart.plugins.mini', - require 'kickstart.plugins.nvim-treesitter', - require 'kickstart.plugins.lazygit', - require 'kickstart.plugins.indent_line', -} diff --git a/lua/kickstart/plugins/vim-sleuth.lua b/lua/kickstart/plugins/vim-sleuth.lua index 8dc80f38..ad6149e8 100644 --- a/lua/kickstart/plugins/vim-sleuth.lua +++ b/lua/kickstart/plugins/vim-sleuth.lua @@ -1 +1 @@ -return 'tpope/vim-sleuth' +return { 'tpope/vim-sleuth' }