From 17e319a4455f3135ed3cc759dee8ba5034fde75b Mon Sep 17 00:00:00 2001 From: Nathan Reiner Date: Thu, 15 Aug 2024 20:28:13 +0200 Subject: update vim config --- .config/nvim/lua/pm/init.lua | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .config/nvim/lua/pm/init.lua (limited to '.config/nvim/lua/pm/init.lua') 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 -- cgit v1.2.3-70-g09d2