chore(build): auto-generate docs

This commit is contained in:
folke 2024-07-06 19:24:52 +00:00 committed by github-actions[bot]
parent 5346b5346a
commit 06e8ef93c8

View File

@ -9,6 +9,7 @@ Table of Contents *persistence.nvim-table-of-contents*
- Installation |persistence.nvim-persistence-installation|
- Configuration |persistence.nvim-persistence-configuration|
- Usage |persistence.nvim-persistence-usage|
- Events |persistence.nvim-persistence-events|
==============================================================================
1. Persistence *persistence.nvim-persistence*
@ -53,16 +54,14 @@ Persistence comes with the following defaults:
>lua
{
dir = vim.fn.stdpath("state") .. "/sessions/", -- directory where session files are saved
options = { "buffers", "curdir", "tabpages", "winsize" }, -- sessionoptions used for saving
pre_save = nil, -- a function to call before saving the session
post_save = nil, -- a function to call after saving the session
save_empty = false, -- don't save if there are no open file buffers
pre_load = nil, -- a function to call before loading the session
post_load = nil, -- a function to call after loading the session
}
<
[!TIP] To configure what should be saved in your session, check |:h
'sessionoptions'|
USAGE *persistence.nvim-persistence-usage*
**Persistence** works well with plugins like `startify` or `dashboard`. It will
@ -70,16 +69,27 @@ never restore a session automatically, but you can of course write an autocmd
that does exactly that if you want.
>lua
-- restore the session for the current directory
vim.api.nvim_set_keymap("n", "<leader>qs", [[<cmd>lua require("persistence").load()<cr>]], {})
-- load the session for the current directory
vim.keymap.set("n", "<leader>qs", function() require("persistence").load() end)
-- restore the last session
vim.api.nvim_set_keymap("n", "<leader>ql", [[<cmd>lua require("persistence").load({ last = true })<cr>]], {})
-- select a session to load
vim.keymap.set("n", "<leader>qS", function() require("persistence").select() end)
-- load the last session
vim.keymap.set("n", "<leader>ql", function() require("persistence").load({ last = true }) end)
-- stop Persistence => session won't be saved on exit
vim.api.nvim_set_keymap("n", "<leader>qd", [[<cmd>lua require("persistence").stop()<cr>]], {})
vim.keymap.set("n", "<leader>qd", function() require("persistence").stop() end)
<
EVENTS *persistence.nvim-persistence-events*
- **PersistenceLoadPre**before loading a session
- **PersistenceLoadPost**after loading a session
- **PersistenceSavePre**before saving a session
- **PersistenceSavePost**after saving a session
Generated by panvimdoc <https://github.com/kdheepak/panvimdoc>
vim:tw=78:ts=8:noet:ft=help:norl: