Change no auto create message from error message to info message
parent
e13c92ea44
commit
35f93b30e4
|
|
@ -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()
|
||||||
|
|
|
||||||
|
|
@ -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,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue