summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.config/nvim/plugin/50-notes.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/.config/nvim/plugin/50-notes.lua b/.config/nvim/plugin/50-notes.lua
new file mode 100644
index 0000000..9ef0fc3
--- /dev/null
+++ b/.config/nvim/plugin/50-notes.lua
@@ -0,0 +1,5 @@
+if vim.env.NOTES_DIR == nil then
+ vim.notify("NOTES_DIR is not set", vim.log.levels.ERROR)
+ return
+end
+vim.g.notes_dir = vim.env.NOTES_DIR:sub(-1) == "/" and vim.env.NOTES_DIR:sub(1, -2) or vim.env.NOTES_DIR