Skip to content

Commit

Permalink
docs: remove duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
olimorris committed Nov 18, 2023
1 parent 0ea44f1 commit 2b3ec15
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -350,14 +350,6 @@ The session data available differs depending on the events that are hooked into.

The plugin contains an extension for [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) which allows the user to list all of the saved session files and source them via `:Telescope persisted`.

### Global variables

The plugin makes a number of global variables available for users to hook into during the lifecycle of their Neovim session:

- `vim.g.persisting` - (bool) Determines if the plugin is active for the current session
- `vim.g.persisted_exists` - (bool) Determines if a session exists for the current working directory
- `vim.g.persisted_loaded_session` - (string) The name of the active session

## :page_with_curl: License

[MIT](https://github.com/olimorris/persisted.nvim/blob/main/LICENSE)
14 changes: 9 additions & 5 deletions doc/persisted.nvim.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ The layout can then be customised from within Telescope:

USAGE *persisted.nvim-usage*

**Default commands**

COMMANDS ~

The plugin comes with a number of commands:

Expand All @@ -114,7 +115,8 @@ The plugin comes with a number of commands:
- `:SessionLoadFromFile` - Load a session from a given path
- `:SessionDelete` - Delete the current session

**Telescope**

TELESCOPE EXTENSION ~

The Telescope extension may be opened via `:Telescope persisted`.

Expand All @@ -124,13 +126,15 @@ Once opened, the available keymaps are:
- `<CR>` - Source the session file
- `<C-d>` - Delete the session file

**Global variables**

GLOBAL VARIABLES ~

The plugin sets global variables which can be utilised in your configuration:


- `vim.g.persisting` - This is set to `true` when a session is started and `false` when a session is stopped
- `vim.g.persisted_loaded_session` - The file path to the currently loaded session
- `vim.g.persisting` - (bool) Determines if the plugin is active for the current session
- `vim.g.persisted_exists` - (bool) Determines if a session exists for the current working directory
- `vim.g.persisted_loaded_session` - (string) The file path to the current session


CONFIGURATION *persisted.nvim-configuration*
Expand Down

0 comments on commit 2b3ec15

Please sign in to comment.