aboutsummaryrefslogtreecommitdiff
path: root/.config/nvim/lua/pm/init.lua
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2024-08-15 20:28:13 +0200
committerNathan Reiner <nathan@nathanreiner.xyz>2024-08-15 20:28:13 +0200
commit17e319a4455f3135ed3cc759dee8ba5034fde75b (patch)
tree6d07c1875ae2736a5f3eb026a243328ab5c73fca /.config/nvim/lua/pm/init.lua
parent346854ff3ea83202de7437f01f1c1c336f4c3edf (diff)
update vim configHEADmaster
Diffstat (limited to '.config/nvim/lua/pm/init.lua')
-rw-r--r--.config/nvim/lua/pm/init.lua27
1 files changed, 27 insertions, 0 deletions
diff --git a/.config/nvim/lua/pm/init.lua b/.config/nvim/lua/pm/init.lua
new file mode 100644
index 0000000..bdc603c
--- /dev/null
+++ b/.config/nvim/lua/pm/init.lua
@@ -0,0 +1,27 @@
+local fs = require('fs')
+
+local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim'
+if not vim.uv.fs_stat(lazypath) then
+ vim.fn.system({
+ "git",
+ "clone",
+ "--filter=blob:none",
+ "https://github.com/folke/lazy.nvim.git",
+ "--branch=stable", -- latest stable release
+ lazypath,
+ })
+end
+vim.opt.rtp:prepend(lazypath)
+
+local plugins = {}
+
+for entry in fs.iterdir(vim.fn.stdpath('config') .. '/lua/pm/plugins/') do
+ local plugin = require('pm.plugins.' .. entry.name .. '.load')
+ table.insert(plugins, plugin)
+end
+
+require('lazy').setup(plugins)
+
+for entry in fs.iterdir(vim.fn.stdpath('config') .. '/lua/pm/plugins/') do
+ require('pm.plugins.' .. entry.name .. '.setup')
+end