From c76c789d905d741123224abe8a6280cd7a4f23ba Mon Sep 17 00:00:00 2001 From: olimorris Date: Tue, 12 Mar 2024 21:46:21 +0000 Subject: [PATCH] docs: update README.md --- README.md | 2 +- doc/persisted.nvim.txt | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1f28e48..2d88e7c 100644 --- a/README.md +++ b/README.md @@ -325,7 +325,7 @@ In this setup, `~/.config` and `~/.local/nvim` are still going to behave in thei ### Ignored branches -You may specify a table of patterns that match against braches for which the plugin will **never** autosave and autoload from. For example: +You may specify a table of patterns that match against branches for which the plugin will **never** autosave and autoload from: ```lua require("persisted").setup({ diff --git a/doc/persisted.nvim.txt b/doc/persisted.nvim.txt index 9558bb9..dcd712a 100644 --- a/doc/persisted.nvim.txt +++ b/doc/persisted.nvim.txt @@ -160,8 +160,14 @@ The plugin comes with the following defaults: follow_cwd = true, -- change session file name to match current working directory if it changes allowed_dirs = nil, -- table of dirs that the plugin will auto-save and auto-load from ignored_dirs = nil, -- table of dirs that are ignored when auto-saving and auto-loading + ignored_branches = nil, -- table of branch patterns that are ignored for auto-saving and auto-loading telescope = { reset_prompt = true, -- Reset the Telescope prompt after an action? + mappings = { -- table of mappings for the Telescope extension + change_branch = "", + copy_session = "", + delete_session = "", + }, }, }) < @@ -352,6 +358,21 @@ their default setting (ignoring all listed directory and its children), however `/` and `/tmp` will only ignore those directories exactly. +IGNORED BRANCHES ~ + +You may specify a table of patterns that match against branches for which the +plugin will **never** autosave and autoload from: + +>lua + require("persisted").setup({ + ignored_branches = { + "^master", + "feature/%u" + }, + }) +< + + EVENTS / CALLBACKS ~ The plugin fires events at various points during its lifecycle: