diff options
| author | moxie <moxie@3kgcat.fi> | 2026-03-15 06:41:37 +0200 |
|---|---|---|
| committer | moxie <moxie@3kgcat.fi> | 2026-03-15 10:05:06 +0200 |
| commit | 49c1e9d1fc3d6bf8748756a8543d8c1b7287940f (patch) | |
| tree | 8e03c663f10c2a0a17b44bef6a3dbf575582fb2c /lua/muwiki/health.lua | |
| parent | c8dc1635f8a921269f714117f414bbc7ba24f9fd (diff) | |
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.
Diffstat (limited to 'lua/muwiki/health.lua')
| -rw-r--r-- | lua/muwiki/health.lua | 4 |
1 files changed, 2 insertions, 2 deletions
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)) |
