From fbc0e8db389b67d50c15e9c9d38a97264369c8d9 Mon Sep 17 00:00:00 2001 From: ThatAmuzak Date: Fri, 21 Nov 2025 21:48:20 -0800 Subject: [PATCH] defaults file path to current working directory automatically sets the file path to the current directory if nothing is entered. Slightly eases the process of adding a new project --- lua/projectmgr/file_adapter.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lua/projectmgr/file_adapter.lua b/lua/projectmgr/file_adapter.lua index 5c3a510..24c1cb4 100644 --- a/lua/projectmgr/file_adapter.lua +++ b/lua/projectmgr/file_adapter.lua @@ -95,10 +95,16 @@ function M.create_project() local path repeat path = vim.fn.input({ - prompt = "Project Path: ", + prompt = "Project Path (default: current): ", completion = "file_in_path", }) print("") + + if path == "" then + path = vim.fn.getcwd() + end + + path = vim.fn.expand(path) until (path ~= "") and (string.len(path) <= 150) local commandstart