diff --git a/lua/cd-project/api.lua b/lua/cd-project/api.lua index 0b868a0..ea6c546 100644 --- a/lua/cd-project/api.lua +++ b/lua/cd-project/api.lua @@ -161,7 +161,7 @@ local function add_current_project(opts) if not project_dir then if opts.auto then - utils.log_error("Can't find project path of current file.\nProject not automatically created.") + utils.log_info("Can't find project path of current file.\nProject not automatically created.") return end project_dir = vim.fn.getcwd() diff --git a/lua/cd-project/utils.lua b/lua/cd-project/utils.lua index a8d763e..c5886e0 100644 --- a/lua/cd-project/utils.lua +++ b/lua/cd-project/utils.lua @@ -3,6 +3,11 @@ local function log_error(msg) vim.notify(msg, vim.log.levels.ERROR, { title = "cd-project.nvim" }) end +---@param msg string +local function log_info(msg) + vim.notify(msg, vim.log.levels.INFO, { title = "cd-project.nvim" }) +end + ---@param path string local function get_tail_of_path(path) -- Remove leading directories, keep the last part @@ -72,6 +77,7 @@ end return { log_error = log_error, + log_info = log_info, get_tail_of_path = get_tail_of_path, remove_trailing_slash = remove_trailing_slash, format_entry = format_entry,