diff options
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 |
