From 456f03e4eb0105ff5c83785f34c01ee29b4d8d34 Mon Sep 17 00:00:00 2001 From: Shadow Cat Date: Wed, 3 Aug 2022 14:57:51 -0400 Subject: [PATCH] reload.lua formatting and comments --- lua/config/reload.lua | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lua/config/reload.lua b/lua/config/reload.lua index f3331dd..79ff6df 100644 --- a/lua/config/reload.lua +++ b/lua/config/reload.lua @@ -3,13 +3,13 @@ local u = require 'config.utils'.load local g vim.api.nvim_create_augroup('reload', {}) --- reload these files when written to - --- @param arg {file: string} local reload_file = function(arg) u.reload(u.path_for(arg.file)) end +-- reload these files when written to + for _, path in ipairs({ 'reload.lua', 'settings.lua', @@ -18,10 +18,6 @@ for _, path in ipairs({ 'theme.lua', }) do u.post_write(g, path, reload_file) end --- allows you to install / clean / update plugins --- after writing to the file - ---- --- @param arg {file: string} local update_plugins = function(arg) -- unload the file if it's not plugins.lua @@ -34,5 +30,7 @@ local update_plugins = function(arg) require 'packer'.compile() end +-- reload plugin files when written to + u.post_write(g, 'plugins.lua', update_plugins) u.post_write(g, 'plugins/*', update_plugins)