@@ -47,6 +47,8 @@ Install the plugin with your preferred package manager:
47
47
}
48
48
```
49
49
50
+ > ** Note** : The ` lazy = true ` option may be useful if you use a dashboard
51
+
50
52
** [ Packer] ( https://github.com/wbthomason/packer.nvim ) **
51
53
52
54
``` lua
@@ -122,10 +124,11 @@ Once opened, the available keymaps are:
122
124
123
125
- ` <CR> ` - Source the session file
124
126
- ` <C-d> ` - Delete the session file
127
+ - ` <C-a> ` - Add/update a git branch to the session file
125
128
126
129
### Global variables
127
130
128
- The plugin sets global variables which can be utilised in your configuration :
131
+ The plugin sets a number of global variables throughout its lifecycle :
129
132
130
133
- ` vim.g.persisting ` - (bool) Determines if the plugin is active for the current session
131
134
- ` vim.g.persisted_exists ` - (bool) Determines if a session exists for the current working directory
@@ -141,16 +144,16 @@ The plugin comes with the following defaults:
141
144
require (" persisted" ).setup ({
142
145
save_dir = vim .fn .expand (vim .fn .stdpath (" data" ) .. " /sessions/" ), -- directory where session files are saved
143
146
silent = false , -- silent nvim message when sourcing session file
144
- use_git_branch = false , -- create session files based on the branch of the git enabled repository
147
+ use_git_branch = false , -- create session files based on the branch of a git enabled repository
145
148
autosave = true , -- automatically save session files when exiting Neovim
146
149
should_autosave = nil , -- function to determine if a session should be autosaved
147
150
autoload = false , -- automatically load the session for the cwd on Neovim startup
148
151
on_autoload_no_session = nil , -- function to run when `autoload = true` but there is no session to load
149
152
follow_cwd = true , -- change session file name to match current working directory if it changes
150
153
allowed_dirs = nil , -- table of dirs that the plugin will auto-save and auto-load from
151
154
ignored_dirs = nil , -- table of dirs that are ignored when auto-saving and auto-loading
152
- telescope = { -- options for the telescope extension
153
- reset_prompt_after_deletion = true , -- whether to reset prompt after session deleted
155
+ telescope = {
156
+ reset_prompt = true , -- Reset prompt after a telescope action?
154
157
},
155
158
})
156
159
```
@@ -241,7 +244,7 @@ require("persisted").setup({
241
244
242
245
Autoloading can be further controlled for certain directories by specifying ` allowed_dirs ` and ` ignored_dirs ` .
243
246
244
- > ** Note** : Autoloading will not occur if a user opens Neovim with arguments. For example: ` nvim some_file.rb `
247
+ > ** Note** : Autoloading will not occur if the plugin is lazy loaded or a user opens Neovim with arguments. For example: ` nvim some_file.rb `
245
248
246
249
### Following current working directory
247
250
@@ -306,7 +309,7 @@ In this setup, `~/.config` and `~/.local/nvim` are still going to behave in thei
306
309
307
310
### Events / Callbacks
308
311
309
- The plugin fires events at various points during its lifecycle which users can hook into:
312
+ The plugin fires events at various points during its lifecycle, which users can hook into:
310
313
311
314
- ` PersistedLoadPre ` - For _ before_ a session is loaded
312
315
- ` PersistedLoadPost ` - For _ after_ a session is loaded
0 commit comments