Auto generate docs
This commit is contained in:
parent
beb1470d8f
commit
8b47de30d6
@ -0,0 +1,98 @@
|
|||||||
|
*persistence.txt* For NVIM v0.5.0 Last change: 2022 September 05
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
Table of Contents *persistence-table-of-contents*
|
||||||
|
|
||||||
|
1. 💾 Persistence |persistence-💾-persistence|
|
||||||
|
- ✨ Features |persistence-✨-features|
|
||||||
|
- ⚡️ Requirements |persistence-⚡️-requirements|
|
||||||
|
- 📦 Installation |persistence-📦-installation|
|
||||||
|
- ⚙️ Configuration |persistence-⚙️-configuration|
|
||||||
|
- 🚀 Usage |persistence-🚀-usage|
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
1. 💾 Persistence *persistence-💾-persistence*
|
||||||
|
|
||||||
|
**Persistence** is a simple lua plugin for automated session management.
|
||||||
|
|
||||||
|
✨ FEATURES *persistence-✨-features*
|
||||||
|
|
||||||
|
|
||||||
|
- automatically saves the active session under `.config/nvim/sessions` on exit
|
||||||
|
- simple API to restore the current or last session
|
||||||
|
|
||||||
|
|
||||||
|
⚡️ REQUIREMENTS *persistence-⚡️-requirements*
|
||||||
|
|
||||||
|
|
||||||
|
- Neovim >= 0.5.0
|
||||||
|
|
||||||
|
|
||||||
|
📦 INSTALLATION *persistence-📦-installation*
|
||||||
|
|
||||||
|
Install the plugin with your preferred package manager:
|
||||||
|
|
||||||
|
PACKER <HTTPS://GITHUB.COM/WBTHOMASON/PACKER.NVIM> ~
|
||||||
|
|
||||||
|
>
|
||||||
|
-- Lua
|
||||||
|
use({
|
||||||
|
"folke/persistence.nvim",
|
||||||
|
event = "BufReadPre", -- this will only start session saving when an actual file was opened
|
||||||
|
module = "persistence",
|
||||||
|
config = function()
|
||||||
|
require("persistence").setup()
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
<
|
||||||
|
|
||||||
|
|
||||||
|
VIM-PLUG <HTTPS://GITHUB.COM/JUNEGUNN/VIM-PLUG> ~
|
||||||
|
|
||||||
|
>
|
||||||
|
" Vim Script
|
||||||
|
Plug 'folke/persistence.nvim'
|
||||||
|
|
||||||
|
lua << EOF
|
||||||
|
require("persistence").setup {
|
||||||
|
-- your configuration comes here
|
||||||
|
-- or leave it empty to use the default settings
|
||||||
|
-- refer to the configuration section below
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
<
|
||||||
|
|
||||||
|
|
||||||
|
⚙️ CONFIGURATION *persistence-⚙️-configuration*
|
||||||
|
|
||||||
|
Persistence comes with the following defaults:
|
||||||
|
|
||||||
|
>
|
||||||
|
{
|
||||||
|
dir = vim.fn.expand(vim.fn.stdpath("config") .. "/sessions/"), -- directory where session files are saved
|
||||||
|
options = { "buffers", "curdir", "tabpages", "winsize" }, -- sessionoptions used for saving
|
||||||
|
}
|
||||||
|
<
|
||||||
|
|
||||||
|
|
||||||
|
🚀 USAGE *persistence-🚀-usage*
|
||||||
|
|
||||||
|
**Persistence** works well with plugins like `startify` or `dashboard`. It will
|
||||||
|
never restore a session automatically, but you can of course write an autocmd
|
||||||
|
that does exactly that if you want.
|
||||||
|
|
||||||
|
>
|
||||||
|
-- restore the session for the current directory
|
||||||
|
vim.api.nvim_set_keymap("n", "<leader>qs", [[<cmd>lua require("persistence").load()<cr>]], {})
|
||||||
|
|
||||||
|
-- restore the last session
|
||||||
|
vim.api.nvim_set_keymap("n", "<leader>ql", [[<cmd>lua require("persistence").load({ last = true })<cr>]], {})
|
||||||
|
|
||||||
|
-- stop Persistence => session won't be saved on exit
|
||||||
|
vim.api.nvim_set_keymap("n", "<leader>qd", [[<cmd>lua require("persistence").stop()<cr>]], {})
|
||||||
|
<
|
||||||
|
|
||||||
|
|
||||||
|
Generated by panvimdoc <https://github.com/kdheepak/panvimdoc>
|
||||||
|
|
||||||
|
vim:tw=78:ts=8:noet:ft=help:norl:
|
Loading…
x
Reference in New Issue
Block a user