refactor!: change default branch separator
parent
2e61c9fb92
commit
e39170f571
|
|
@ -129,7 +129,7 @@ require("persisted").setup({
|
|||
command = "VimLeavePre", -- the autocommand for which the session is saved
|
||||
silent = false, -- silent nvim message when sourcing session file
|
||||
use_git_branch = false, -- create session files based on the branch of the git enabled repository
|
||||
branch_separator = "_", -- string used to separate session directory name from branch name
|
||||
branch_separator = "@@", -- string used to separate session directory name from branch name
|
||||
autosave = true, -- automatically save session files when exiting Neovim
|
||||
should_autosave = nil, -- function to determine if a session should be autosaved
|
||||
autoload = false, -- automatically load the session for the cwd on Neovim startup
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ local defaults = {
|
|||
command = "VimLeavePre", -- the autocommand for which the session is saved
|
||||
silent = false, -- silent nvim message when sourcing session file
|
||||
use_git_branch = false, -- create session files based on the branch of the git enabled repository
|
||||
branch_separator = "_", -- string used to separate session directory name from branch name
|
||||
branch_separator = "@@", -- string used to separate session directory name from branch name
|
||||
autosave = true, -- automatically save session files when exiting Neovim
|
||||
should_autosave = nil, -- function to determine if a session should be autosaved
|
||||
autoload = false, -- automatically load the session for the cwd on Neovim startup
|
||||
|
|
|
|||
|
|
@ -82,16 +82,6 @@ function M.setup(opts)
|
|||
config.setup(opts)
|
||||
setup_commands()
|
||||
|
||||
if opts and 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
|
||||
M.load()
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue