diff --git a/README.md b/README.md index 756b8dd..2c24a88 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,6 @@ Forked from Persistence.nvim - [Usage](#rocket-usage) - [Default commands](#default-commands) - [Telescope](#telescope) - - [Lazy loading](#lazy-loading) - [Helpers](#helpers) - [Configuration](#wrench-configuration) - [Defaults](#defaults) @@ -81,20 +80,27 @@ lua << EOF } EOF ``` + +### Lazy loading + +The plugin is designed to work with startup screens like [vim-startify](https://github.com/mhinz/vim-startify) or [dashboard](https://github.com/glepnir/dashboard-nvim) out of the box. It will never load a session automatically by default. + +However, to lazy load the plugin add the `module = "persisted"` line to packer. + ## :rocket: Usage ### Default commands The plugin comes with a number of commands: -- `SessionToggle` - Determines whether to load, start or stop a session -- `SessionStart` - Start recording a session. Useful if `autosave = false` -- `SessionStop` - Stop recording a session -- `SessionSave` - Save the current session -- `SessionLoad` - Load the session for the current directory and current branch if `git_use_branch = true` -- `SessionLoadLast` - Load the last session -- `SessionDelete` - Delete the current session +- `:SessionToggle` - Determines whether to load, start or stop a session +- `:SessionStart` - Start recording a session. Useful if `autosave = false` +- `:SessionStop` - Stop recording a session +- `:SessionSave` - Save the current session +- `:SessionLoad` - Load the session for the current directory and current branch if `git_use_branch = true` +- `:SessionLoadLast` - Load the last session +- `:SessionDelete` - Delete the current session -> **Note:** The author only binds `SessionToggle` to a keymap for simplicity. +> **Note:** The author only binds `:SessionToggle` to a keymap for simplicity. ### Telescope @@ -104,12 +110,6 @@ Once opened, the available keymaps are: * `` - Source the session file * `` - Delete the session file -### Lazy loading - -The plugin is designed to work with startup screens like [vim-startify](https://github.com/mhinz/vim-startify) or [dashboard](https://github.com/glepnir/dashboard-nvim) out of the box. It will never load a session automatically by default. - -However, to lazy load the plugin add the `module = "persisted"` line to packer. - ### Helpers The plugin sets a global variable, `vim.g.persisting`, which is set to `true` when a session is started. The author uses this to display an icon in their [statusline](https://github.com/olimorris/dotfiles/blob/0cdaee183c64f872778952f90f62b9366851101c/.config/nvim/lua/Oli/plugins/statusline.lua#L257).