mirror of
https://github.com/folke/persistence.nvim.git
synced 2025-07-31 16:14:48 +02:00
docs: added vim-plug instructions and updated lazy-loading event for packer to BufReadPre
This commit is contained in:
parent
43b005ef5f
commit
0194df8e05
1 changed files with 16 additions and 1 deletions
17
README.md
17
README.md
|
@ -21,7 +21,7 @@ Install the plugin with your preferred package manager:
|
|||
-- Lua
|
||||
use({
|
||||
"folke/persistence.nvim",
|
||||
event = "VimEnter",
|
||||
event = "BufReadPre", -- this will only start session saving when an actual file was opened
|
||||
module = "persistence",
|
||||
config = function()
|
||||
require("persistence").setup()
|
||||
|
@ -29,6 +29,21 @@ use({
|
|||
})
|
||||
```
|
||||
|
||||
### [vim-plug](https://github.com/junegunn/vim-plug)
|
||||
|
||||
```vim
|
||||
" 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 comes with the following defaults:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue