From 4e07e36ca785cbb2d2c0685505d973462e2b1669 Mon Sep 17 00:00:00 2001 From: Taken Date: Wed, 30 Aug 2023 23:54:29 +0200 Subject: [PATCH] Made more plugins be lazy loaded --- lua/taken/lazy/lazy.lua | 21 ++++++++++++++++++--- lua/taken/plugins/{ => lazy}/neogit.lua | 0 2 files changed, 18 insertions(+), 3 deletions(-) rename lua/taken/plugins/{ => lazy}/neogit.lua (100%) diff --git a/lua/taken/lazy/lazy.lua b/lua/taken/lazy/lazy.lua index 33aee5a..0302eb3 100644 --- a/lua/taken/lazy/lazy.lua +++ b/lua/taken/lazy/lazy.lua @@ -56,7 +56,10 @@ local plugins = { end, }, -- development - "github/copilot.vim", + { + "github/copilot.vim", + event = "VimEnter" + }, { "nvim-tree/nvim-tree.lua", dependencies = { "nvim-tree/nvim-web-devicons" }, @@ -108,8 +111,18 @@ local plugins = { ft = "markdown", }, "numToStr/Comment.nvim", - { "NeogitOrg/neogit", dependencies = "nvim-lua/plenary.nvim" }, - "sindrets/diffview.nvim", + { + "NeogitOrg/neogit", + dependencies = "nvim-lua/plenary.nvim", + config = function() + require("taken.plugins.lazy.neogit") + end, + cmd = "Neogit", + }, + { + "sindrets/diffview.nvim", + cmd = "DiffviewOpen", + }, "windwp/nvim-autopairs", { "windwp/nvim-ts-autotag", dependencies = "nvim-treesitter" }, { @@ -139,6 +152,8 @@ local plugins = { config = function() require("taken.plugins.lazy.neorg") end, + cmd = "Neorg", + ft = "norg", }, { "NvChad/nvim-colorizer.lua", diff --git a/lua/taken/plugins/neogit.lua b/lua/taken/plugins/lazy/neogit.lua similarity index 100% rename from lua/taken/plugins/neogit.lua rename to lua/taken/plugins/lazy/neogit.lua