Skip to content

Commit 3e0c504

Browse files
committed
docs: update README.md
1 parent ab7040d commit 3e0c504

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ Install the plugin with your preferred package manager:
4747
}
4848
```
4949

50+
> **Note**: The `lazy = true` option may be useful if you use a dashboard
51+
5052
**[Packer](https://github.com/wbthomason/packer.nvim)**
5153

5254
```lua
@@ -122,10 +124,11 @@ Once opened, the available keymaps are:
122124

123125
- `<CR>` - Source the session file
124126
- `<C-d>` - Delete the session file
127+
- `<C-a>` - Add/update a git branch to the session file
125128

126129
### Global variables
127130

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:
129132

130133
- `vim.g.persisting` - (bool) Determines if the plugin is active for the current session
131134
- `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:
141144
require("persisted").setup({
142145
save_dir = vim.fn.expand(vim.fn.stdpath("data") .. "/sessions/"), -- directory where session files are saved
143146
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
145148
autosave = true, -- automatically save session files when exiting Neovim
146149
should_autosave = nil, -- function to determine if a session should be autosaved
147150
autoload = false, -- automatically load the session for the cwd on Neovim startup
148151
on_autoload_no_session = nil, -- function to run when `autoload = true` but there is no session to load
149152
follow_cwd = true, -- change session file name to match current working directory if it changes
150153
allowed_dirs = nil, -- table of dirs that the plugin will auto-save and auto-load from
151154
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?
154157
},
155158
})
156159
```
@@ -241,7 +244,7 @@ require("persisted").setup({
241244

242245
Autoloading can be further controlled for certain directories by specifying `allowed_dirs` and `ignored_dirs`.
243246

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`
245248
246249
### Following current working directory
247250

@@ -306,7 +309,7 @@ In this setup, `~/.config` and `~/.local/nvim` are still going to behave in thei
306309

307310
### Events / Callbacks
308311

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:
310313

311314
- `PersistedLoadPre` - For _before_ a session is loaded
312315
- `PersistedLoadPost` - For _after_ a session is loaded

0 commit comments

Comments
 (0)