diff options
| author | moxie <moxie@3kgcat.fi> | 2026-03-14 10:28:08 +0200 |
|---|---|---|
| committer | moxie <moxie@3kgcat.fi> | 2026-03-14 10:29:54 +0200 |
| commit | c8dc1635f8a921269f714117f414bbc7ba24f9fd (patch) | |
| tree | 336a0bb466a5e023c0a0e6472c9876ff7458de68 /lua/muwiki/config.lua | |
| parent | ffc0482ab89924cb35155fa82033e3d0ddc6c93d (diff) | |
refactor: consolidate modules and improve structure
Diffstat (limited to 'lua/muwiki/config.lua')
| -rw-r--r-- | lua/muwiki/config.lua | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lua/muwiki/config.lua b/lua/muwiki/config.lua index 2a89427..1e7e3de 100644 --- a/lua/muwiki/config.lua +++ b/lua/muwiki/config.lua @@ -1,5 +1,3 @@ -local fs = require('muwiki.fs') - local M = {} M.options = { @@ -23,6 +21,11 @@ date: ${date} create_missing_dirs = false, } +local function dir_exists(path) + local stat = vim.uv.fs_stat(path) + return stat and stat.type == 'directory' +end + function M.setup(opts) opts = opts or {} @@ -46,7 +49,7 @@ function M.setup(opts) end for _, dir in ipairs(M.options.dirs or {}) do - if not fs.dir_exists(dir.path) then + if not dir_exists(dir.path) then vim.notify('Wiki directory not found: ' .. dir.path, vim.log.levels.WARN) end end |
