modified architecture
This commit is contained in:
30
lua/plugin_loader.lua
Normal file
30
lua/plugin_loader.lua
Normal file
@@ -0,0 +1,30 @@
|
||||
local config = require("config").plugins
|
||||
|
||||
-- Plugin loader
|
||||
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
vim.fn.system({
|
||||
"git",
|
||||
"clone",
|
||||
"--filter=blob:none",
|
||||
"https://github.com/folke/lazy.nvim.git",
|
||||
lazypath,
|
||||
})
|
||||
end
|
||||
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
-- Plugins
|
||||
|
||||
local plugins = {}
|
||||
|
||||
for name, info in pairs(config) do
|
||||
if info.enabled then
|
||||
local plugin = require("plugins." .. name)
|
||||
table.insert(plugins, plugin)
|
||||
end
|
||||
end
|
||||
|
||||
require("lazy").setup(plugins)
|
||||
Reference in New Issue
Block a user