From e39170f5715f3d701f05f0f13370b7f560e1ebc0 Mon Sep 17 00:00:00 2001 From: olimorris Date: Wed, 2 Nov 2022 17:38:41 +0000 Subject: [PATCH] refactor!: change default branch separator --- README.md | 2 +- lua/persisted/config.lua | 2 +- lua/persisted/init.lua | 10 ---------- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index fbb4663..c8b6ba0 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/lua/persisted/config.lua b/lua/persisted/config.lua index fef9973..e0dd4c2 100644 --- a/lua/persisted/config.lua +++ b/lua/persisted/config.lua @@ -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 diff --git a/lua/persisted/init.lua b/lua/persisted/init.lua index 9b3917c..c3c5661 100644 --- a/lua/persisted/init.lua +++ b/lua/persisted/init.lua @@ -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