refactor!: warn of future branch_separator change

main
olimorris 2022-10-26 17:41:44 +01:00
parent cf3b9a45fe
commit 5347c83ee4
1 changed files with 10 additions and 0 deletions

View File

@ -82,6 +82,16 @@ function M.setup(opts)
config.setup(opts) config.setup(opts)
setup_commands() setup_commands()
if not opts.branch_separator and config.options.branch_separator == "_" then
vim.notify(
"[Persisted.nvim] We will soon be changing the default `branch_separator` config value to `@@`\n" ..
"[Persisted.nvim] We notice you're using the current default value of `_`\n" ..
"[Persisted.nvim] To continue using this, please add `branch_separator = \"_\"` to your config and we'll quit bugging you\n" ..
"[Persisted.nvim] Otherwise, please replace the `_` in your session names with `@@`",
vim.log.levels.WARN
)
end
if config.options.autoload and (allow_dir() and not ignore_dir()) and vim.fn.argc() == 0 then if config.options.autoload and (allow_dir() and not ignore_dir()) and vim.fn.argc() == 0 then
M.load() M.load()
end end