Skip to content

Commit

Permalink
docs: update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
olimorris committed Sep 11, 2024
1 parent 0caa1b4 commit a9d1d6e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -449,11 +449,13 @@ If you'd like to ignore certain branches from being saved as a session:
local utils = require("persisted.utils")
local ignored_branches = {
"feature_branch"
"bug_fix_branch"
}

persisted.setup(opts)

-- Only start the plugin if the branch isn't in the ignored list
if not utils.in_table(persisted.branch(), ignored_branches) then
persisted.load()
persisted.start()
end
end
Expand Down
4 changes: 3 additions & 1 deletion doc/persisted.nvim.txt
Original file line number Diff line number Diff line change
Expand Up @@ -473,11 +473,13 @@ If you’d like to ignore certain branches from being saved as a session:
local utils = require("persisted.utils")
local ignored_branches = {
"feature_branch"
"bug_fix_branch"
}

persisted.setup(opts)

-- Only start the plugin if the branch isn't in the ignored list
if not utils.in_table(persisted.branch(), ignored_branches) then
persisted.load()
persisted.start()
end
end
Expand Down

0 comments on commit a9d1d6e

Please sign in to comment.