summary refs log tree commit diff
path: root/.vim/lua/zk.lua
diff options
context:
space:
mode:
Diffstat (limited to '.vim/lua/zk.lua')
-rw-r--r--.vim/lua/zk.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/.vim/lua/zk.lua b/.vim/lua/zk.lua
index bb7fe35..242badc 100644
--- a/.vim/lua/zk.lua
+++ b/.vim/lua/zk.lua
@@ -3,8 +3,12 @@ local function zk_new(path, title_dir)
   path = path or vim.loop.cwd()
   if not (path and #path > 0) then return end
 
-  title_dir = title_dir or vim.fn.input('New Zettel: ')
-  if not title_dir or (title_dir == "") then return end
+  if not title_dir then
+    vim.ui.input('New Zettel: ', function(result)
+      title_dir = result
+      end)
+  end
+  if title_dir == "" then return end
 
   local o = {}
   local parts = vim.split(title_dir, '/')