Refresh generated nvim config
This commit is contained in:
@ -0,0 +1,85 @@
|
||||
*persistence.nvim.txt* For Neovim >= 0.8.0 Last change: 2024 May 16
|
||||
|
||||
==============================================================================
|
||||
Table of Contents *persistence.nvim-table-of-contents*
|
||||
|
||||
1. Persistence |persistence.nvim-persistence|
|
||||
- Features |persistence.nvim-persistence-features|
|
||||
- Requirements |persistence.nvim-persistence-requirements|
|
||||
- Installation |persistence.nvim-persistence-installation|
|
||||
- Configuration |persistence.nvim-persistence-configuration|
|
||||
- Usage |persistence.nvim-persistence-usage|
|
||||
|
||||
==============================================================================
|
||||
1. Persistence *persistence.nvim-persistence*
|
||||
|
||||
**Persistence** is a simple lua plugin for automated session management.
|
||||
|
||||
|
||||
FEATURES *persistence.nvim-persistence-features*
|
||||
|
||||
- automatically saves the active session under `~/.local/state/nvim/sessions` on exit
|
||||
- simple API to restore the current or last session
|
||||
|
||||
|
||||
REQUIREMENTS *persistence.nvim-persistence-requirements*
|
||||
|
||||
- Neovim >= 0.7.2
|
||||
|
||||
|
||||
INSTALLATION *persistence.nvim-persistence-installation*
|
||||
|
||||
Install the plugin with your preferred package manager:
|
||||
|
||||
|
||||
LAZY.NVIM ~
|
||||
|
||||
>lua
|
||||
-- Lua
|
||||
{
|
||||
"folke/persistence.nvim",
|
||||
event = "BufReadPre", -- this will only start session saving when an actual file was opened
|
||||
opts = {
|
||||
-- add any custom options here
|
||||
}
|
||||
}
|
||||
<
|
||||
|
||||
|
||||
CONFIGURATION *persistence.nvim-persistence-configuration*
|
||||
|
||||
Persistence comes with the following defaults:
|
||||
|
||||
>lua
|
||||
{
|
||||
dir = vim.fn.expand(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
|
||||
}
|
||||
<
|
||||
|
||||
|
||||
USAGE *persistence.nvim-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.
|
||||
|
||||
>lua
|
||||
-- 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:
|
||||
@ -0,0 +1,8 @@
|
||||
persistence.nvim-persistence persistence.nvim.txt /*persistence.nvim-persistence*
|
||||
persistence.nvim-persistence-configuration persistence.nvim.txt /*persistence.nvim-persistence-configuration*
|
||||
persistence.nvim-persistence-features persistence.nvim.txt /*persistence.nvim-persistence-features*
|
||||
persistence.nvim-persistence-installation persistence.nvim.txt /*persistence.nvim-persistence-installation*
|
||||
persistence.nvim-persistence-requirements persistence.nvim.txt /*persistence.nvim-persistence-requirements*
|
||||
persistence.nvim-persistence-usage persistence.nvim.txt /*persistence.nvim-persistence-usage*
|
||||
persistence.nvim-table-of-contents persistence.nvim.txt /*persistence.nvim-table-of-contents*
|
||||
persistence.nvim.txt persistence.nvim.txt /*persistence.nvim.txt*
|
||||
Reference in New Issue
Block a user