From 49c1e9d1fc3d6bf8748756a8543d8c1b7287940f Mon Sep 17 00:00:00 2001 From: moxie Date: Sun, 15 Mar 2026 06:41:37 +0200 Subject: refactor: move template/mkdir features to user-configured autocmds - Remove auto-mkdir autocmd from init.lua (now user-configured) - Remove template system entirely (now user-configured) - Rename io.lua -> utils.lua - Inline single-use functions (handle_web_link, handle_file_link, etc.) - Remove security warnings for external files - Remove unused config options: use_template, template, date_fmt - Simplify utils.resolve() without wiki root validation - Update all documentation examples BREAKING CHANGE: Users must now add their own autocmds for: - Auto-creating directories on save (BufWritePre) - Applying templates to new files (BufNewFile) See README.md for updated configuration examples. --- lua/muwiki/health.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lua/muwiki/health.lua') diff --git a/lua/muwiki/health.lua b/lua/muwiki/health.lua index 2dfd45b..22c9747 100644 --- a/lua/muwiki/health.lua +++ b/lua/muwiki/health.lua @@ -1,5 +1,5 @@ -local io_module = require('muwiki.io') +local utils = require('muwiki.utils') local M = {} @@ -26,7 +26,7 @@ M.check = function() vim.health.info('Add to your config: dirs = {{name = "default", path = "~/wiki"}}') else for _, dir in ipairs(cfg.dirs) do - if io_module.dir_exists(dir.path) then + if utils.dir_exists(dir.path) then vim.health.ok(string.format("Wiki '%s': %s", dir.name, dir.path)) else vim.health.warn(string.format("Wiki '%s': %s (not found)", dir.name, dir.path)) -- cgit v1.2.3