Change no auto create message from error message to info message

master
Bryan 2024-09-20 00:32:06 -06:00
parent e13c92ea44
commit 35f93b30e4
2 changed files with 7 additions and 1 deletions

View File

@ -161,7 +161,7 @@ local function add_current_project(opts)
if not project_dir then if not project_dir then
if opts.auto 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 return
end end
project_dir = vim.fn.getcwd() project_dir = vim.fn.getcwd()

View File

@ -3,6 +3,11 @@ local function log_error(msg)
vim.notify(msg, vim.log.levels.ERROR, { title = "cd-project.nvim" }) vim.notify(msg, vim.log.levels.ERROR, { title = "cd-project.nvim" })
end end
---@param msg string
local function log_info(msg)
vim.notify(msg, vim.log.levels.INFO, { title = "cd-project.nvim" })
end
---@param path string ---@param path string
local function get_tail_of_path(path) local function get_tail_of_path(path)
-- Remove leading directories, keep the last part -- Remove leading directories, keep the last part
@ -72,6 +77,7 @@ end
return { return {
log_error = log_error, log_error = log_error,
log_info = log_info,
get_tail_of_path = get_tail_of_path, get_tail_of_path = get_tail_of_path,
remove_trailing_slash = remove_trailing_slash, remove_trailing_slash = remove_trailing_slash,
format_entry = format_entry, format_entry = format_entry,