fix creepy issue related to lazyloading

This commit is contained in:
siduck 2022-06-14 19:50:34 +05:30
parent 0bde81a074
commit 31f0a2bd4c
1 changed files with 15 additions and 7 deletions

View File

@ -1,7 +1,5 @@
vim.cmd "packadd packer.nvim" vim.cmd "packadd packer.nvim"
local lazy_load = require "core.lazy_load"
local plugins = { local plugins = {
["nvim-lua/plenary.nvim"] = {}, ["nvim-lua/plenary.nvim"] = {},
@ -36,7 +34,9 @@ local plugins = {
["akinsho/bufferline.nvim"] = { ["akinsho/bufferline.nvim"] = {
tag = "v2.*", tag = "v2.*",
opt = true, opt = true,
setup = lazy_load.bufferline(), setup = function()
require("core.lazy_load").bufferline()
end,
config = function() config = function()
require "plugins.configs.bufferline" require "plugins.configs.bufferline"
end, end,
@ -51,7 +51,9 @@ local plugins = {
["NvChad/nvim-colorizer.lua"] = { ["NvChad/nvim-colorizer.lua"] = {
opt = true, opt = true,
setup = lazy_load.colorizer(), setup = function()
require("core.lazy_load").colorizer()
end,
config = function() config = function()
require("plugins.configs.others").colorizer() require("plugins.configs.others").colorizer()
end, end,
@ -60,7 +62,9 @@ local plugins = {
["nvim-treesitter/nvim-treesitter"] = { ["nvim-treesitter/nvim-treesitter"] = {
module = "nvim-treesitter", module = "nvim-treesitter",
cmd = { "TSInstall", "TSUninstall" }, cmd = { "TSInstall", "TSUninstall" },
setup = lazy_load.treesitter(), setup = function()
require("core.lazy_load").treesitter()
end,
run = ":TSUpdate", run = ":TSUpdate",
config = function() config = function()
require "plugins.configs.treesitter" require "plugins.configs.treesitter"
@ -70,7 +74,9 @@ local plugins = {
-- git stuff -- git stuff
["lewis6991/gitsigns.nvim"] = { ["lewis6991/gitsigns.nvim"] = {
opt = true, opt = true,
setup = lazy_load.gitsigns(), setup = function()
require("core.lazy_load").gitsigns()
end,
config = function() config = function()
require("plugins.configs.others").gitsigns() require("plugins.configs.others").gitsigns()
end, end,
@ -80,7 +86,9 @@ local plugins = {
["williamboman/nvim-lsp-installer"] = { ["williamboman/nvim-lsp-installer"] = {
opt = true, opt = true,
setup = lazy_load.on_file_open(), setup = function()
require("core.lazy_load").on_file_open()
end,
}, },
["neovim/nvim-lspconfig"] = { ["neovim/nvim-lspconfig"] = {