summaryrefslogtreecommitdiffstats
path: root/lua/dotfiles/notes.lua
diff options
context:
space:
mode:
authorThomas Vanbesien <tvanbesi@proton.me>2026-06-24 17:31:53 +0200
committerThomas Vanbesien <tvanbesi@proton.me>2026-06-24 17:35:22 +0200
commitd21d7758dae1e80f2a50bcda580179bf12bf2bf1 (patch)
treed67b2f744f43554792700cbcd6138b9dd8660a6d /lua/dotfiles/notes.lua
parentd08a3df4f5cbc8411d295e00bf8e42b0bf5c5355 (diff)
downloadnvim-config-d21d7758dae1e80f2a50bcda580179bf12bf2bf1.tar.gz
nvim-config-d21d7758dae1e80f2a50bcda580179bf12bf2bf1.zip
fix(nvim): check that NOTES_DIR exists before running code that depends on it
Diffstat (limited to 'lua/dotfiles/notes.lua')
-rw-r--r--lua/dotfiles/notes.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/lua/dotfiles/notes.lua b/lua/dotfiles/notes.lua
new file mode 100644
index 0000000..cec362b
--- /dev/null
+++ b/lua/dotfiles/notes.lua
@@ -0,0 +1,6 @@
+-- Resolved notes directory (normalized), or nil when `$NOTES_DIR` is unset.
+-- Single source of truth shared by the notes feature (plugin/50-notes.lua) and the follow engine
+-- wiring (plugin/50-follow.lua).
+local M = {}
+M.dir = vim.env.NOTES_DIR and vim.fs.normalize(vim.env.NOTES_DIR) or nil
+return M