docs: update README.md

main
olimorris 2024-08-08 23:14:18 +01:00
parent 22e17b07fb
commit 7e170b4927
2 changed files with 19 additions and 30 deletions

View File

@ -403,12 +403,8 @@ local ignored_branches = {
"feature_branch"
}
if utils.in_table(persisted.branch(), ignored_branches) ~= nil then
if not utils.in_table(persisted.branch(), ignored_branches) then
persisted.load()
persisted.start()
end
```
## :page_with_curl: License
[MIT](https://github.com/olimorris/persisted.nvim/blob/main/LICENSE)

View File

@ -9,7 +9,6 @@ Table of Contents *persisted.nvim-table-of-contents*
- Usage |persisted.nvim-usage|
- Configuration |persisted.nvim-configuration|
- Extending the Plugin |persisted.nvim-extending-the-plugin|
- License |persisted.nvim-license|
FEATURES *persisted.nvim-features*
@ -28,7 +27,7 @@ REQUIREMENTS *persisted.nvim-requirements*
INSTALLATION *persisted.nvim-installation*
Install the plugin with your preferred package manager:
Install and configure the plugin with your preferred package manager:
**Lazy.nvim**
@ -141,32 +140,31 @@ The plugin comes with the following defaults:
>lua
{
---@type boolean
autostart = true, -- Automatically start the plugin on load?
---@type fun(boolean)
should_save = nil, -- Function to determine if a session should be saved
---@type string
-- Function to determine if a session should be saved
---@type fun(): boolean
should_save = function()
return true
end,
save_dir = vim.fn.expand(vim.fn.stdpath("data") .. "/sessions/"), -- Directory where session files are saved
---@type boolean
follow_cwd = true, -- Change the session file to match any change in the cwd?
use_git_branch = false, -- Include the git branch in the session file name?
---@type boolean
autoload = false, -- Automatically load the session for the cwd on Neovim startup?
---@type fun(boolean)
on_autoload_no_session = nil, -- Function to run when `autoload = true` but there is no session to load
---@type boolean
follow_cwd = true, -- Change session file name with changes in the cwd?
---@type table
allowed_dirs = nil, -- Table of dirs that the plugin will start and autoload from
---@type table
ignored_dirs = nil, -- Table of dirs that are ignored for autosaving and autoloading
-- Function to run when `autoload = true` but there is no session to load
---@type fun(): any
on_autoload_no_session = function() end,
allowed_dirs = {}, -- Table of dirs that the plugin will start and autoload from
ignored_dirs = {}, -- Table of dirs that are ignored for starting and autoloading
telescope = {
mappings = { -- Mappings for managing sessions in Telescope
change_branch = "<C-b>",
copy_session = "<C-c>",
change_branch = "<C-b>",
delete_session = "<C-d>",
},
icons = { -- icons displayed in the Telescope picker
@ -411,7 +409,7 @@ Neovim. A custom autocmd can be created which forces the autoload:
})
<
Or, a user who wishes to check whether the current branch is in an a table of
Or, a user who wishes to check whether the current branch is in a table of
branches to be ignored:
>lua
@ -427,17 +425,12 @@ branches to be ignored:
"feature_branch"
}
if utils.in_table(persisted.branch(), ignored_branches) ~= nil then
if not utils.in_table(persisted.branch(), ignored_branches) then
persisted.load()
persisted.start()
end
<
LICENSE *persisted.nvim-license*
MIT <https://github.com/olimorris/persisted.nvim/blob/main/LICENSE>
Generated by panvimdoc <https://github.com/kdheepak/panvimdoc>
vim:tw=78:ts=8:noet:ft=help:norl: